diff --git a/src/components/auth/guard/PaymentAccessGuard.tsx b/src/components/auth/guard/PaymentAccessGuard.tsx index 698984b..81a4945 100644 --- a/src/components/auth/guard/PaymentAccessGuard.tsx +++ b/src/components/auth/guard/PaymentAccessGuard.tsx @@ -1,24 +1,53 @@ import { useQuery } from '@tanstack/react-query'; import memberApi from '@/apis/member/memberApi'; -import { useNavigate } from 'react-router-dom'; +import { useState, useEffect } from 'react'; +import { Outlet, useNavigate } from 'react-router-dom'; import RoutePath from '@/routes/routePath'; +import { toast } from 'react-toastify'; const PaymentAccessGuard = () => { + const [redirect, setRedirect] = useState(false); const navigate = useNavigate(); const { data } = useQuery({ queryKey: ['member'], queryFn: memberApi.GET_DASHBOARD }); - if (!data) { - return