-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* NoAcccessPage | ||
* | ||
* This is the page we show when the user do not have appropriate credentials | ||
* | ||
*/ | ||
|
||
// TODO | ||
// @ts-nocheck | ||
|
||
import React from 'react'; | ||
import { useFocusWhenNavigate, LinkButton } from '@strapi/helper-plugin'; | ||
import { Main } from '@strapi/design-system/Main'; | ||
import { ContentLayout, HeaderLayout } from '@strapi/design-system/Layout'; | ||
import { EmptyStateLayout } from '@strapi/design-system/EmptyStateLayout'; | ||
import { EmptyPictures, ArrowRight } from "@strapi/icons"; | ||
import { useIntl } from 'react-intl'; | ||
|
||
const NoAcccessPage = () => { | ||
const { formatMessage } = useIntl(); | ||
useFocusWhenNavigate(); | ||
|
||
return ( | ||
<Main labelledBy="title"> | ||
<HeaderLayout | ||
id="title" | ||
title={formatMessage({ | ||
id: 'page.auth.noAccess', | ||
defaultMessage: 'No access', | ||
})} | ||
/> | ||
<ContentLayout> | ||
<EmptyStateLayout | ||
action={ | ||
<LinkButton variant="secondary" endIcon={<ArrowRight />} to="/"> | ||
{formatMessage({ | ||
id: 'components.notAccessPage.back', | ||
defaultMessage: 'Back to homepage', | ||
})} | ||
</LinkButton> | ||
} | ||
content={formatMessage({ | ||
id: 'page.auth.not.allowed', | ||
defaultMessage: "Oops! It seems like You do not have access to this page...", | ||
})} | ||
hasRadius | ||
icon={<EmptyPictures width="10rem" />} | ||
shadow="tableShadow" | ||
/> | ||
</ContentLayout> | ||
</Main> | ||
); | ||
}; | ||
|
||
export default NoAcccessPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters