1+ import { DevSetCookieButton } from "@frontend/common/components" ;
2+ import { useBackendContext } from "@frontend/common/hooks/useAPI" ;
13import { useShopClient , useSignInWithSNSMutation , useUserStatus } from "@frontend/shop/hooks" ;
24import { AccountCircleOutlined , Google } from "@mui/icons-material" ;
35import { Backdrop , Button , ButtonProps , CircularProgress , Stack , Typography } from "@mui/material" ;
@@ -15,6 +17,7 @@ type PageeStateType = {
1517
1618export const ShopSignInPage : FC = Suspense . with ( { fallback : < CircularProgress /> } , ( ) => {
1719 const { setAppContext, language } = useAppContext ( ) ;
20+ const { backendApiAbsoluteDomain, backendApiSessionCookieName } = useBackendContext ( ) ;
1821 const [ state , setState ] = useState < PageeStateType > ( { openBackdrop : false } ) ;
1922 const navigate = useNavigate ( ) ;
2023 const shopAPIClient = useShopClient ( ) ;
@@ -92,6 +95,15 @@ export const ShopSignInPage: FC = Suspense.with({ fallback: <CircularProgress />
9295 < PageLayout spacing = { 6 } >
9396 < Typography variant = "h4" sx = { { textAlign : "center" , fontWeight : "bolder" } } children = { signInTitleStr } />
9497 < Stack spacing = { 1 } sx = { { width : "100%" , maxWidth : "400px" } } >
98+ { import . meta. env . DEV && (
99+ < DevSetCookieButton
100+ backendDomain = { backendApiAbsoluteDomain ?? "" }
101+ cookieName = { backendApiSessionCookieName ?? "" }
102+ cookieValue = { shopAPIClient . getSessionId ( ) ?? "" }
103+ >
104+ [localhost] 세션 쿠키 동기화 (로그인 전 클릭)
105+ </ DevSetCookieButton >
106+ ) }
95107 { btnProps . map ( ( props , index ) => (
96108 < Button key = { index } { ...commonBtnProps } { ...props } />
97109 ) ) }
0 commit comments