Skip to content

Commit

Permalink
refactor: Refactor SignButtonGroup component to import Button and Lin…
Browse files Browse the repository at this point in the history
…k from specific paths
  • Loading branch information
seonghunYang committed May 20, 2024
1 parent 78edbd4 commit e6a148c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/ui/user/user-info-navigator/sign-button-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { auth } from '@/app/business/user/user.query';
import SignOutButton from './sign-out-button';
import UserDeleteButton from './user-delete-button';
import SignInLinkButton from './sign-in-link-button';
import Button from '../../view/atom/button/button';
import Link from 'next/link';

export default async function SignButtonGroup() {
const userInfo = await auth();
Expand Down
4 changes: 4 additions & 0 deletions app/ui/user/user-info-navigator/sign-in-link-button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
'use client';
import useDialog from '@/app/hooks/useDialog';
import Button from '../../view/atom/button/button';
import { useRouter } from 'next/navigation';
import { DIALOG_KEY } from '@/app/utils/key/dialog-key.util';

export default function SignInLinkButton() {
const { close } = useDialog(DIALOG_KEY.SIDE_NAVIGATION);
const router = useRouter();

const handleToLoginButtonClick = () => {
close();
router.push('/sign-in');
};
return <Button onClick={handleToLoginButtonClick} size="sm" variant="text" label="로그인" />;
Expand Down

0 comments on commit e6a148c

Please sign in to comment.