changed 404 page to functional component

This commit is contained in:
Kim, Jimin 2021-12-14 21:15:04 +09:00
parent 84c2e082a6
commit be04d04039

View file

@ -5,9 +5,8 @@ import { Helmet } from "react-helmet-async"
import theming from "../theming" import theming from "../theming"
const StyledNotFound = styled.div` const StyledNotFound = styled.div`
margin: auto;
margin-top: 2rem;
text-align: center; text-align: center;
color: ${(props) => color: ${(props) =>
theming.theme(props.theme.currentTheme, { theming.theme(props.theme.currentTheme, {
light: "#111111", light: "#111111",
@ -16,11 +15,10 @@ const StyledNotFound = styled.div`
` `
const Styled404 = styled.h1` const Styled404 = styled.h1`
font-size: 3rem; font-size: 5rem;
` `
export default class NotFound extends React.Component { const NotFound = () => {
render() {
return ( return (
<> <>
<Helmet> <Helmet>
@ -33,16 +31,16 @@ export default class NotFound extends React.Component {
property="og:image" property="og:image"
content="http://developomp.com/icon/icon.svg" content="http://developomp.com/icon/icon.svg"
/> />
<meta <meta property="og:description" content="Page does not exist" />
property="og:description"
content="Page does not exist"
/>
</Helmet> </Helmet>
<StyledNotFound className="card main-content"> <StyledNotFound className="card main-content">
<Styled404>404</Styled404> <Styled404>404</Styled404>
the page you are looking for does not exist. :( <br />
Page was not found :(
</StyledNotFound> </StyledNotFound>
</> </>
) )
}
} }
export default NotFound