File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ export const description = style({
2525export const button = style ( {
2626 marginTop : "1.6rem" ,
2727 ...themeVars . text . F14 ,
28- backgroundColor : themeVars . color . white [ 100 ] ,
2928 color : themeVars . color . black [ 100 ] ,
29+ backgroundColor : themeVars . color . white [ 100 ] ,
3030 borderRadius : "8px" ,
3131 padding : "0.8rem 1.2rem" ,
3232 selectors : {
Original file line number Diff line number Diff line change 1+ 'use client'
12import NoneImage from "@/shared/assets/2D-illust/none.svg" ;
23import * as styles from "./not-found.css" ;
3- import Link from "next/link" ;
4+
45import { PATH } from "@/shared/constants/path" ;
6+ import { useRouter } from "next/navigation" ;
7+
58export default function NotFound ( ) {
9+ const router = useRouter ( ) ;
10+
611 return (
712 < div className = { styles . container } >
813 < NoneImage width = { 120 } height = { 65 } />
914 < p className = { styles . title } > 페이지를 찾을 수 없습니다.</ p >
1015 < p className = { styles . description } >
1116 찾으시는 페이지가 존재하지 않거나 </ p >
1217 < p className = { styles . description } > 이동되었을 수 있습니다.</ p >
13- < Link href = { PATH . HOME } >
14- < button className = { styles . button } > 홈으로 돌아가기</ button >
15- </ Link >
18+ < button
19+ onClick = { ( ) => router . push ( PATH . HOME ) }
20+ className = { styles . button }
21+ >
22+ 홈으로 돌아가기
23+ </ button >
1624 </ div >
1725 ) ;
1826}
Original file line number Diff line number Diff line change 11import ky , { type Options as KyOptions , type ResponsePromise } from "ky" ;
22import { HTTP_STATUS_CODE } from "@/shared/constants/api" ;
33import { HTTPError } from "ky" ;
4- import Router from "next/router " ;
4+ import { PATH } from "@/shared/constants/path " ;
55
66const API_BASE_URL =
77 process . env . NODE_ENV === "development"
@@ -23,11 +23,11 @@ const http = ky.create({
2323 const { response } = error ;
2424 switch ( response . status ) {
2525 case HTTP_STATUS_CODE . UNAUTHORIZED : {
26- Router . push ( "/login" ) ;
26+ window . location . replace ( PATH . LOGIN ) ;
2727 break ;
2828 }
2929 case HTTP_STATUS_CODE . NOT_FOUND : {
30- Router . push ( "/404" ) ;
30+ window . location . replace ( "/404" ) ;
3131 break ;
3232 }
3333 }
You can’t perform that action at this time.
0 commit comments