Skip to content
Snippets Groups Projects
Commit 4f88ce51 authored by 한동현's avatar 한동현
Browse files

feat: 404 페이지 추가

parent 72029cae
Branches
No related tags found
No related merge requests found
import { Link } from 'react-router';
import { House } from 'lucide-react';
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
export default function NotFound() {
return (
<div className="flex w-full justify-center p-6 md:p-10">
<Card className="w-full max-w-md text-center">
<CardHeader className="flex-row">
<div className="flex flex-col space-y-1.5 w-full">
<CardTitle className="text-xl">페이지를 찾을 수 없습니다</CardTitle>
<CardDescription>404 Not Found</CardDescription>
</div>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
페이지의 주소가 잘못 입력되었거나, 주소의 변경 혹은 삭제로 인해 사용하실 수 없습니다. 입력하신 주소가
정확한지 다시 한번 확인해주세요.
</p>
<Link to="/">
<Button className="mt-6">
<House className="mr-2 h-4 w-4" /> 홈으로
</Button>
</Link>
</CardContent>
</Card>
</div>
);
}
import { Routes, Route } from 'react-router'; import { Routes, Route } from 'react-router';
import Root from '@/pages/Root'; import Root from '@/pages/Root';
import NotFound from '@/pages/NotFound';
import Home from '@/pages/Home'; import Home from '@/pages/Home';
import Login from '@/pages/Login'; import Login from '@/pages/Login';
import RoutingList from '@/pages/routing/List'; import RoutingList from '@/pages/routing/List';
...@@ -13,6 +14,7 @@ export default function AppRoutes() { ...@@ -13,6 +14,7 @@ export default function AppRoutes() {
<Route path="routing"> <Route path="routing">
<Route index element={<RoutingList />} /> <Route index element={<RoutingList />} />
</Route> </Route>
<Route path="*" element={<NotFound />} />
</Route> </Route>
</Routes> </Routes>
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment