File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1- import Button from '~/components/ui/Button' ;
21import LoginVisible from '~/components/feature/auth/LoginVisible' ;
32import HeaderSearchBar from '~/components/layout/Header/HeaderSearchBar' ;
3+ import Button from '~/components/ui/Button' ;
4+ import { IS_BETA , IS_DEV } from '~/constants/api' ;
45import { useLanguage } from '~/hooks/useLanguage' ;
56import { useStore } from '~/store' ;
67
@@ -28,7 +29,7 @@ export default function HeaderRight() {
2829 < Divider />
2930 </ LoginVisible >
3031
31- { import . meta . env . DEV ? < DevLogin /> : < ProdLogin t = { t } /> }
32+ { IS_DEV || IS_BETA ? < DevLogin /> : < ProdLogin t = { t } /> }
3233
3334 < Divider />
3435
Original file line number Diff line number Diff line change 1- import Button from '~/components/ui/Button' ;
21import LoginVisible from '~/components/feature/auth/LoginVisible' ;
32import HeaderSearchBar from '~/components/layout/Header/HeaderSearchBar' ;
3+ import Button from '~/components/ui/Button' ;
4+ import { IS_BETA , IS_DEV } from '~/constants/api' ;
45import { useLanguage } from '~/hooks/useLanguage' ;
56import { useStore } from '~/store' ;
67
@@ -28,7 +29,7 @@ export default function HeaderRight() {
2829 < Divider />
2930 </ LoginVisible >
3031
31- { import . meta . env . DEV ? < DevLogin /> : < ProdLogin t = { t } /> }
32+ { IS_DEV || IS_BETA ? < DevLogin /> : < ProdLogin t = { t } /> }
3233
3334 < Divider />
3435
Original file line number Diff line number Diff line change @@ -41,25 +41,20 @@ export const useStore = create<Store>()((set) => ({
4141 window . location . reload ( ) ;
4242 } ,
4343 mockLogin : async ( role : Role ) => {
44- if ( ! import . meta. env . DEV ) return ;
45-
4644 const response = await fetch ( `${ BASE_URL } /v2/mock-login?role=${ role } ` , {
4745 method : 'GET' ,
4846 credentials : 'include' ,
4947 } ) ;
5048 if ( response . ok ) set ( { role } ) ;
5149 } ,
5250 mockLogout : async ( ) => {
53- if ( ! import . meta. env . DEV ) return ;
54-
5551 await fetch ( `${ BASE_URL } /v1/logout` , {
5652 method : 'GET' ,
5753 credentials : 'include' ,
5854 } ) . catch ( ( ) => {
5955 // CORS 에러 무시 (리다이렉트로 인한 에러)
6056 } ) ;
6157
62- // CORS 에러가 떠서 임시 처리
6358 // TODO: 추후 수정
6459 window . location . reload ( ) ;
6560 } ,
You can’t perform that action at this time.
0 commit comments