Skip to content

Commit

Permalink
fix(#131): 언마우트로 인해 toast가 사라지는 오류 해결
Browse files Browse the repository at this point in the history
isCloseOnUnmount : false
  • Loading branch information
ATeals committed Nov 25, 2024
1 parent f6586c1 commit 3fc46a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/frontend/src/page/login/success/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function RouteComponent() {
}

function SuccessComponent({ nickname }: { nickname: string }) {
const { toast } = useToast();
const { toast } = useToast({ isCloseOnUnmount: false });

useEffect(() => {
toast({ description: `${nickname}님 환영합니다!`, duration: 2000 });
Expand All @@ -44,7 +44,7 @@ function SuccessComponent({ nickname }: { nickname: string }) {
}

function ErrorComponent() {
const { toast } = useToast();
const { toast } = useToast({ isCloseOnUnmount: false });

useEffect(() => {
toast({ variant: 'error', description: '로그인에 실패했습니다.', duration: 2000 });
Expand Down

0 comments on commit 3fc46a0

Please sign in to comment.