File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 33 "background_color" : " #f3f4f6" ,
44 "display" : " standalone" ,
55 "scope" : " ." ,
6- "start_url" : " /mobile/main " ,
6+ "start_url" : " /mobile/sign-in " ,
77 "name" : " 빌릴게" ,
88 "short_name" : " 빌릴게" ,
99 "description" : " 국민대학교 소프트웨어융합대학 복지물품 대여 서비스" ,
Original file line number Diff line number Diff line change 22
33import ImageLoginLogo from 'public/assets/images/image-login-logo.svg' ;
44import IconGoogle from 'public/assets/icons/icon-google.svg' ;
5+ import { useEffect } from 'react' ;
6+ import { useRouter } from 'next/navigation' ;
57
68export default function SignIn ( ) {
9+ const router = useRouter ( ) ;
10+
711 const handleLogin = ( ) => {
812 window . location . href = `${ process . env . NEXT_PUBLIC_API_BASE_URI } /oauth2/authorization/google` ;
913 } ;
1014
15+ useEffect ( ( ) => {
16+ if ( localStorage . getItem ( 'token' ) ) {
17+ router . replace ( '/mobile/main' ) ;
18+ }
19+ } , [ ] ) ;
20+
1121 return (
1222 < section className = "relative flex h-dvh w-full flex-col items-center justify-start overflow-hidden" >
1323 < section className = "mt-[128px] flex flex-col items-center justify-start gap-1.5" >
@@ -18,7 +28,7 @@ export default function SignIn() {
1828 </ section >
1929 < ImageLoginLogo className = "absolute top-24" />
2030 < button
21- className = "absolute bottom-44 flex w-11/12 justify-between rounded-2xl border bg-white-primary px-6 py-4"
31+ className = "absolute bottom-44 flex w-11/12 max-w-md justify-between rounded-2xl border bg-white-primary px-6 py-4"
2232 type = "button"
2333 onClick = { handleLogin }
2434 >
You can’t perform that action at this time.
0 commit comments