From 439d4b21795825dbf7173a991b6284d16be8cbbd Mon Sep 17 00:00:00 2001 From: uuyeong Date: Sat, 21 Dec 2024 00:21:09 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20notfounderror=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.hash.js | 9 +++++++-- src/main.js | 9 +++++++-- src/pages/index.js | 4 ++-- src/pages/notFound/NotFoundErrorPage.js | 16 ++++++++++++++++ 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 src/pages/notFound/NotFoundErrorPage.js diff --git a/src/main.hash.js b/src/main.hash.js index b6c359ec..7332d094 100644 --- a/src/main.hash.js +++ b/src/main.hash.js @@ -1,4 +1,9 @@ -import { HomePage, NotFoundPage, ProfilePage, LoginPage } from "./pages/index"; +import { + HomePage, + NotFoundErrorPage, + ProfilePage, + LoginPage, +} from "./pages/index"; import { HashRouter } from "./lib/hashRouter"; const hashRouter = new HashRouter(); @@ -7,5 +12,5 @@ hashRouter.createRoutes({ "/": { component: HomePage }, "/profile": { component: ProfilePage, requiresAuth: true }, "/login": { component: LoginPage }, - notFound: { component: NotFoundPage }, + notFound: { component: NotFoundErrorPage }, }); diff --git a/src/main.js b/src/main.js index 9877d274..219e6efd 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,9 @@ -import { HomePage, NotFoundPage, ProfilePage, LoginPage } from "./pages/index"; +import { + HomePage, + NotFoundErrorPage, + ProfilePage, + LoginPage, +} from "./pages/index"; import { Router } from "./lib/router"; const router = new Router(); @@ -7,5 +12,5 @@ router.createRoutes({ "/": { component: HomePage }, "/profile": { component: ProfilePage, requiresAuth: true }, "/login": { component: LoginPage }, - notFound: { component: NotFoundPage }, + notFound: { component: NotFoundErrorPage }, }); diff --git a/src/pages/index.js b/src/pages/index.js index c0704676..8c26a1ee 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,6 +1,6 @@ import { HomePage } from "./home/HomePage"; import { LoginPage } from "./login/LoginPage"; import { ProfilePage } from "./profile/ProfilePage"; -import { NotFoundPage } from "./notFound/NotFoundPage"; +import { NotFoundErrorPage } from "./notFound/NotFoundErrorPage"; -export { HomePage, NotFoundPage, ProfilePage, LoginPage }; +export { HomePage, NotFoundErrorPage, ProfilePage, LoginPage }; diff --git a/src/pages/notFound/NotFoundErrorPage.js b/src/pages/notFound/NotFoundErrorPage.js new file mode 100644 index 00000000..6ae77a94 --- /dev/null +++ b/src/pages/notFound/NotFoundErrorPage.js @@ -0,0 +1,16 @@ +export function NotFoundErrorPage() { + return `
+
+

항해플러스

+

404

+

페이지를 찾을 수 없습니다

+

+ 요청하신 페이지가 존재하지 않거나 이동되었을 수 있습니다. +

+ + 홈으로 돌아가기 + +
+
+ `; +}