diff --git a/frontend/src/pages/AskLogin.tsx b/frontend/src/pages/AskLogin.tsx index b4d10eb78..c1c7ef3df 100644 --- a/frontend/src/pages/AskLogin.tsx +++ b/frontend/src/pages/AskLogin.tsx @@ -6,30 +6,12 @@ import Space from '../components/common/Space'; import Text from '../components/common/Text'; import useSetLayoutWidth from '../hooks/useSetLayoutWidth'; import { DEFAULT_PROD_URL, FULLSCREEN } from '../constants'; -import { getApi } from '../apis/getApi'; -import useNavigator from '../hooks/useNavigator'; - -const API_URL = - process.env.NODE_ENV === 'production' - ? process.env.REACT_APP_API_DEFAULT_PROD - : 'http://localhost:3000'; const AskLogin = () => { - const { routePage } = useNavigator(); const { width } = useSetLayoutWidth(FULLSCREEN); const loginButtonClick = async () => { - if (API_URL === 'http://localhost:3000') { - const data = await getApi('default', '/login'); - - localStorage.setItem('userToken', data.accessToken); - localStorage.setItem('user', JSON.stringify(data.member)); - - routePage('/'); - return; - } - - window.location.href = `${API_URL}/oauth/kakao`; + window.location.href = `${DEFAULT_PROD_URL}/oauth/kakao`; }; return (