Skip to content

Commit

Permalink
๐Ÿ› bug : ์ธ๊ฐ€์ฝ”๋“œ ์ข€ ๋ณด๋‚ด๋ด๋ผ ์ œ๋ฐœ
Browse files Browse the repository at this point in the history
  • Loading branch information
seondal committed Feb 20, 2024
1 parent bed27fc commit 419c52b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/app/api/users/login/oauth/kakao/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
'use client';

import { useSearchParams } from 'next/navigation';
import { useEffect } from 'react';

import { getRegister } from '@/apis';

interface PageProps {
searchParams: {
code: string;
};
}
export default function Page() {
const code = useSearchParams().get('code');

export default function Page({ searchParams }: PageProps) {
useEffect(() => {
console.log(searchParams.code);
getRegister(searchParams.code);
if (code) {
console.log(code);
getRegister(code);
}
});

return <>Loading...</>;
Expand Down

0 comments on commit 419c52b

Please sign in to comment.