-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 changed file
with
15 additions
and
8 deletions.
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import React from 'react'; | ||
import SVG from '../../assets/images/404 page.svg'; | ||
import NotFoundImage from '../../assets/images/404 page.svg'; | ||
import { Image, NotFoundText, NotFoundBtn } from './NotFoundStyle'; | ||
import Layout from "../../styles/Layout"; | ||
import {useNavigate} from "react-router-dom"; | ||
import styled from "styled-components"; | ||
|
||
export default function NotFound() { | ||
return ( | ||
<Layout align="center"> | ||
<Image src={SVG} alt="404" /> | ||
<NotFoundText>페이지를 찾을 수 없음</NotFoundText> | ||
<NotFoundBtn>이전페이지</NotFoundBtn> | ||
</Layout> | ||
); | ||
const navigate = useNavigate(); | ||
const handleBack = () => { | ||
navigate(-1); | ||
} | ||
|
||
return ( | ||
<Layout align="center"> | ||
<Image src={NotFoundImage} alt="404페이지 로고" /> | ||
<NotFoundText>페이지를 찾을 수 없음</NotFoundText> | ||
<NotFoundBtn onClick={handleBack}>이전페이지</NotFoundBtn> | ||
</Layout> | ||
); | ||
} |