Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
role="application-layout"
css={css`
height: 100vh;
display: grid;
grid-template-rows: auto 43px 1fr;
grid-template-columns: auto 1fr;
`}
>
<div role="global-notifications">
</div>
{() => {
if (!projectKeyFromUrl) return ;
return (
{({ isLoading: isProjectLoading, project }) => {
if (isProjectLoading) return null;
// when used outside of a project context,
// or when the project is expired or supsended
const useProjectContext =
project &&
!(
(project.suspension &&
const ReduxProviders = ({ children }) => (
<div>
{children}
</div>
);
ReduxProviders.propTypes = {
{'Do or do not, there is no try.'}
{'These are not the droids you are looking for!'}
{`It's a trap!`}
{'Do or do not, there is no try.'}
{'These are not the droids you are looking for!'}
{`It's a trap!`}
);
it('should select latest global notifications', () => {
expect(
selectLatestGlobalNotificationAsList.resultFunc([
{ domain: DOMAINS.GLOBAL },
{ domain: DOMAINS.SIDE },
{ domain: DOMAINS.PAGE },
])
).toEqual([{ domain: DOMAINS.GLOBAL }]);
});
});
it('should render GLOBAL ', () => {
expect(wrapper.find('NotificationsList').at(0)).toHaveProp(
'domain',
DOMAINS.GLOBAL
);
});
it('should render PAGE ', () => {
it('should select global notifications', () => {
expect(
selectGlobalNotifications.resultFunc([
{ domain: DOMAINS.GLOBAL },
{ domain: DOMAINS.PAGE },
])
).toEqual([{ domain: DOMAINS.GLOBAL }]);
});
});
notifications.filter(notification => notification.domain === DOMAINS.GLOBAL)
);
{label => (
)}
switch (notification.domain) {
case DOMAINS.PAGE:
switch (notification.kind) {
case 'error':
case 'warning':
case 'info':
case 'success':
return GenericNotification;
case 'api-error':
return ApiErrorNotification;
case 'unexpected-error':
return UnexpectedErrorNotification;
default:
return null;
}
case DOMAINS.GLOBAL:
switch (notification.kind) {
case 'error':
case 'warning':
case 'info':
case 'success':
return GenericNotification;
case 'unexpected-error':
return UnexpectedErrorNotification;
default:
return null;
}
case DOMAINS.SIDE:
switch (notification.kind) {
case 'info':
case 'success':
case 'warning':