Skip to content

Commit b1634a8

Browse files
committed
베타에서도 베타 로그인
1 parent 6debc18 commit b1634a8

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

app/components/layout/Header/HeaderRight.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import Button from '~/components/ui/Button';
21
import LoginVisible from '~/components/feature/auth/LoginVisible';
32
import HeaderSearchBar from '~/components/layout/Header/HeaderSearchBar';
3+
import Button from '~/components/ui/Button';
4+
import { IS_BETA, IS_DEV } from '~/constants/api';
45
import { useLanguage } from '~/hooks/useLanguage';
56
import { 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

app/components/layout/header/HeaderRight.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import Button from '~/components/ui/Button';
21
import LoginVisible from '~/components/feature/auth/LoginVisible';
32
import HeaderSearchBar from '~/components/layout/Header/HeaderSearchBar';
3+
import Button from '~/components/ui/Button';
4+
import { IS_BETA, IS_DEV } from '~/constants/api';
45
import { useLanguage } from '~/hooks/useLanguage';
56
import { 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

app/store.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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
},

0 commit comments

Comments
 (0)