mirror of
https://github.com/ershisan99/todolist_next.git
synced 2026-01-24 05:12:08 +00:00
add sign-up page
This commit is contained in:
@@ -10,7 +10,8 @@ import { useMeQuery } from "@/services";
|
||||
export const AuthRedirect: FC<{ children: ReactNode }> = ({ children }) => {
|
||||
const router = useRouter();
|
||||
const { data: user, isLoading } = useMeQuery();
|
||||
const isAuthPage = router.pathname === "/login";
|
||||
const isAuthPage =
|
||||
router.pathname === "/login" || router.pathname === "/sign-up";
|
||||
|
||||
useEffect(() => {
|
||||
if (!isLoading && !user && !isAuthPage) {
|
||||
|
||||
Reference in New Issue
Block a user