We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cfcf0d commit 3cf7a4eCopy full SHA for 3cf7a4e
front/src/components/loaders/WithoutLogin.tsx
@@ -1,18 +1,12 @@
1
import type { PropsWithChildren } from 'react';
2
-import { useEffect } from 'react';
3
import { Navigate } from 'react-router-dom';
4
5
import { useAuthContext } from '@/hooks/useAuthContext.tsx';
6
7
-import { toast } from '@/components/Toast/index.ts';
8
-
9
import { ROUTE_URL } from '@/constants/index.ts';
10
11
export default function WithoutLogin({ children }: PropsWithChildren) {
12
const { isLogin } = useAuthContext();
13
- useEffect(() => {
14
- if (isLogin) toast.warning('로그인 후 접근할 수 없습니다.\n로그 아웃 후 이용해주세요.');
15
- }, [isLogin]);
16
if (isLogin) {
17
return <Navigate to={ROUTE_URL.PROGRAM.DEFAULT} />;
18
}
0 commit comments