Skip to content

Commit

Permalink
fix: useSearchParams 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Xvezda committed Apr 28, 2024
1 parent 55bf99c commit e012cdb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions apps/web/app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
"use client";

import Link from 'next/link';
import { Suspense } from 'react';
import { useSearchParams } from 'next/navigation';
import NaverLoginButton from '@/components/naver-login-button/button';

export default function LoginPage() {
const searchParams = useSearchParams();

return (
<div>
<NaverLoginButton prevUrl={decodeURIComponent(searchParams.get('prevUrl') ?? '')} />
<Suspense>
<LoginButton />
</Suspense>
</div>
);
}

function LoginButton() {
const searchParams = useSearchParams();

return <NaverLoginButton prevUrl={decodeURIComponent(searchParams.get('prevUrl') ?? '')} />;
}

0 comments on commit e012cdb

Please sign in to comment.