Skip to content

Commit

Permalink
chore :: url setting
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Jun 10, 2024
1 parent 9638951 commit 859bba7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/apis/adminLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useMutation } from 'react-query';
import { instance } from './axios';
import { setCookies, setTokens } from '@/utils/cookies';
import { AuthResponse } from './login';
import { COOKIE_DOMAIN } from '@/constant/env';
import { ADMIN_URL, COOKIE_DOMAIN } from '@/constant/env';
import { AxiosError } from 'axios';
import { Toast } from '@team-entry/design_system';

Expand Down Expand Up @@ -36,7 +36,7 @@ export const useAdminLogin = (redirectURL: string) => {
}
},
onSuccess: (res) => {
window.location.href = 'https://admin.entrydsm.hs.kr';
window.location.href = `${ADMIN_URL}`;
setTokens(res.data.accessToken, res.data.refreshToken);
setCookies('authority', 'admin', {
path: '/',
Expand Down
4 changes: 2 additions & 2 deletions src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { NotFound } from './pages/404';
import { Pass } from './components/Pass';
import { Verify } from './pages/Verify';
import { getQueryValues } from './utils/getQueryValues';
import { MAIN_URL } from './constant/env';

export const Router = () => {
const redirectURL =
getQueryValues().get('redirect_url') || 'https://www.entrydsm.hs.kr';
const redirectURL = getQueryValues().get('redirect_url') || `${MAIN_URL}`;

return (
<BrowserRouter>
Expand Down

0 comments on commit 859bba7

Please sign in to comment.