added translaton to 404 page

This commit is contained in:
Kim, Jimin 2022-04-17 19:37:48 +09:00
parent b28264ba70
commit 56bf555bd7

View file

@ -1,8 +1,11 @@
import { useContext } from "react"
import styled from "styled-components" import styled from "styled-components"
import { Helmet } from "react-helmet-async" import { Helmet } from "react-helmet-async"
import MainContent from "../components/MainContent" import MainContent from "../components/MainContent"
import { globalContext } from "../globalContext"
const StyledNotFound = styled(MainContent)` const StyledNotFound = styled(MainContent)`
text-align: center; text-align: center;
` `
@ -12,6 +15,8 @@ const Styled404 = styled.h1`
` `
const NotFound = () => { const NotFound = () => {
const { globalState } = useContext(globalContext)
return ( return (
<> <>
<Helmet> <Helmet>
@ -30,7 +35,9 @@ const NotFound = () => {
<StyledNotFound> <StyledNotFound>
<Styled404>404</Styled404> <Styled404>404</Styled404>
<br /> <br />
Page was not found :( {globalState.locale == "en"
? "Page was not found :("
: "페이지를 찾을 수 없습니다 :("}
</StyledNotFound> </StyledNotFound>
</> </>
) )