-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: "not authorised" page style (#1279)
- Loading branch information
Showing
4 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/app-security/src/admin/assets/images/SecureRouteError.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
55 changes: 55 additions & 0 deletions
55
packages/app-security/src/components/NotAuthorizedError.tsx
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 @@ | ||
import * as React from "react"; | ||
import { Link } from "@webiny/react-router"; | ||
import { css } from "emotion"; | ||
import styled from "@emotion/styled"; | ||
import Helmet from "react-helmet"; | ||
import authErrorImg from "../admin/assets/images/SecureRouteError.svg"; | ||
import { Typography } from "@webiny/ui/Typography"; | ||
|
||
const ContentWrapper = styled("div")({ | ||
display: "block", | ||
paddingTop: "15%", | ||
textAlign: "center", | ||
margin: "auto" | ||
}); | ||
|
||
const styles = { | ||
authErrorImgStyle: css({ | ||
width: "192px", | ||
paddingBottom: "24px" | ||
}), | ||
bodyStyle: css({ | ||
color: "var(--mdc-theme-text-primary-on-background)", | ||
display: "block" | ||
}), | ||
linkStyle: css({ | ||
textDecoration: "none", | ||
"&:hover": { | ||
textDecoration: "none" | ||
} | ||
}) | ||
}; | ||
|
||
const NotAuthorizedError = () => { | ||
return ( | ||
<ContentWrapper> | ||
<Helmet title={"Not authorized"} /> | ||
|
||
<img className={styles.authErrorImgStyle} src={authErrorImg} alt="Not Authorized" /> | ||
|
||
<Typography use={"body1"} className={styles.bodyStyle}> | ||
You are not authorized to view this route. | ||
</Typography> | ||
|
||
<Typography use={"body1"} className={styles.bodyStyle}> | ||
Please contact your administrator to request access. | ||
</Typography> | ||
|
||
<Link to="/" className={styles.linkStyle}> | ||
Take me back. | ||
</Link> | ||
</ContentWrapper> | ||
); | ||
}; | ||
|
||
export default NotAuthorizedError; |
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