Skip to content

Commit

Permalink
fix: https (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiwonh423 authored Aug 14, 2023
1 parent e70e11f commit 80dde4b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/AskLoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Space from '../components/common/Space';

export default function AskLoginPage() {
const loginButtonClick = () => {
window.location.href = 'http://mapbefine.kro.kr/api/oauth/kakao';
window.location.href = 'https://mapbefine.kro.kr/api/oauth/kakao';
};

return (
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/KaKaoRedirectPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { LoginResponse } from '../types/Login';
export const handleOAuthKakao = async (code: string) => {
const { routePage } = useNavigator();
try {
const url = `http://mapbefine.kro.kr/api/oauth/login/kakao?code=${code}`;
const url = `https://mapbefine.kro.kr/api/oauth/login/kakao?code=${code}`;
console.log('line12');
const data = await getApi<LoginResponse>('login', url);

localStorage.setItem('userToken', data.accessToken);
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/pages/My.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const My = () => {
return <div>My</div>;
};

export default My;
8 changes: 7 additions & 1 deletion frontend/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import AuthLayout from './components/Layout/AuthLayout';
import MoaBogi from './pages/MoaBogi';
import Zzlegyeo from './pages/Zzlegyeo';
import NotFound from './components/NotFound';
import My from './pages/My';

interface routeElement {
path: string;
Expand All @@ -27,7 +28,7 @@ const routes: routeElement[] = [
{
path: '/',
element: <RootPage />,
errorElement: <NotFound />,
errorElement: <NotFound />,
withAuth: false,

children: [
Expand All @@ -41,6 +42,11 @@ const routes: routeElement[] = [
element: <MoaBogi />,
withAuth: true,
},
{
path: 'my',
element: <My />,
withAuth: true,
},
{
path: 'zzlegyeo',
element: <Zzlegyeo />,
Expand Down

0 comments on commit 80dde4b

Please sign in to comment.