Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 없는 페이지에 접근하려 할 경우 404로 이동 #501

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/src/pages/errorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default function ErrorPage($container, errorCode = 0) {
case 401:
comment = "어이 넌 권한이 없다.";
break;
case 404:
comment = "그런 거 없다.";
break;
Comment on lines +14 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그런거 없다.

case 403:
comment = "클라이언트 요청 관련 오류.";
break;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Router($container) {
currentPage = new ErrorPage($container, info.errorCode);
currentHeader = new emptyHeader($header);
} else if (TargetPage === ErrorPage) {
currentPage = new ErrorPage($container, 401); // 그냥 아래 부분과 합쳐도 되지만 가독성을 위해 분리했습니다.
currentPage = new ErrorPage($container, 404); // 그냥 아래 부분과 합쳐도 되지만 가독성을 위해 분리했습니다.
currentHeader = new emptyHeader($header);
} else {
if (currentPage instanceof TargetPage && prevInfo === info) return; // 이전 페이지와 같은 페이지로 이동할 때는 렌더링하지 않습니다.
Expand Down
Loading