add sign-up page

This commit is contained in:
2024-08-09 16:53:37 +02:00
parent 750578b787
commit da0cccfb0e
6 changed files with 87 additions and 18 deletions

View File

@@ -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) {