Skip to content

Commit

Permalink
fix: kakao login base url 상수파일에서 import하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
gxxrxn committed Jul 11, 2024
1 parent 6f77cf9 commit 5e44897
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/common/LoginLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import Link from 'next/link';
import { usePathname } from 'next/navigation';

import { SEARCH_PARAMS_KEYS } from '@/constants/key';
import { KAKAO_LOGIN_BASE_URL } from '@/constants/url';
import { createQueryString } from '@/utils/url';

type LoginLinkProps = Omit<ComponentPropsWithRef<typeof Link>, 'href'>;

const LoginLink = ({
children,
replace = true,
...props
}: PropsWithChildren<LoginLinkProps>) => {
const pathname = usePathname();
Expand All @@ -19,7 +21,11 @@ const LoginLink = ({
});

return (
<Link href={`${process.env.KAKAO_LOGIN_BASE_URL}${search}`} {...props}>
<Link
href={`${KAKAO_LOGIN_BASE_URL}${search}`}
replace={replace}
{...props}
>
{children}
</Link>
);
Expand Down

0 comments on commit 5e44897

Please sign in to comment.