diff --git a/src/App.tsx b/src/App.tsx index 83d5225..e0ba9fe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -49,7 +49,11 @@ const routes: RouteObject[] = [ path: "/mypage/store/:storeId", element: , errorElement: , - } + }, + { + path: "*", + element : + }, ]; const router = createBrowserRouter(routes); diff --git a/src/pages/NotFound.tsx b/src/pages/NotFound.tsx index 8c4f25f..5a631b1 100644 --- a/src/pages/NotFound.tsx +++ b/src/pages/NotFound.tsx @@ -1,4 +1,61 @@ -const NotFound = () => { - return
존재하지 않는 페이지입니다.
; +import React from 'react'; +import { useNavigate } from 'react-router-dom'; +import { Search, Home, ArrowLeft } from 'lucide-react'; + +const NotFound: React.FC = () => { + const navigate = useNavigate(); + + const handleGoBack = () => { + if (window.history.length > 1) { + window.history.back(); + } else { + navigate('/', {replace: true}); + } + }; + + return ( +
+
+ {/* 아이콘 섹션 */} +
+
+
+
+
+ +
+
+ + {/* 텍스트 섹션 */} +

404

+

+ 페이지를 찾을 수 없습니다 +

+

+ 요청하신 페이지가 삭제되었거나 주소가 올바르지 않습니다.
+ 입력하신 URL을 다시 한번 확인해 주세요. +

+ + {/* 버튼 섹션 */} +
+ + +
+
+
+ ); }; -export default NotFound; + +export default NotFound; \ No newline at end of file