Skip to content

Commit

Permalink
feat: notFound page (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
0plan authored Apr 17, 2024
1 parent 4e2dca6 commit e7c1c2a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
6 changes: 6 additions & 0 deletions public/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ home:
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
signIn: Sign In
signOut: Sign Out

error:
notFound:
title: Oops!
content: Sorry, an unexpected error has occurred.
button: Go back to the home page
6 changes: 6 additions & 0 deletions public/locales/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ home:
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
signIn: ๋กœ๊ทธ์ธ
signOut: ๋กœ๊ทธ์•„์›ƒ

error:
notFound:
title: ์ด๋Ÿฐ!
content: ์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค, ์˜ˆ๊ธฐ์น˜ ๋ชปํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.
button: ํ™ˆํŽ˜์ด์ง€๋กœ ๋Œ์•„๊ฐ€๊ธฐ
20 changes: 18 additions & 2 deletions src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
import { Button } from '@/components/ui/button';
import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next';

export default function NotFound() {
const { t } = useTranslation();

return (
<div id="error-page">
<h1>Oops!</h1>
<p>Sorry, an unexpected error has occurred.</p>
<div className="relative overflow-hidden before:absolute before:start-1/2 before:top-0">
<div className="mx-auto max-w-[85rem] px-4 pb-10 pt-24 sm:px-6 lg:px-8">
<div className="mx-auto mt-5 max-w-2xl text-center">
<h2>{t('error.notFound.title')}</h2>
<p>{t('error.notFound.content')}</p>
<Link to="/">
<Button className="mt-4">{t('error.notFound.button')}</Button>
</Link>
</div>
</div>

</div>
</div>
);
}

0 comments on commit e7c1c2a

Please sign in to comment.