We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0cf6bbd + 7fa8e3b commit 5988a81Copy full SHA for 5988a81
app/auth/page.js
@@ -2,10 +2,15 @@
2
3
import Image from "next/image";
4
import Link from "next/link";
5
-import { useState } from "react";
+import { useEffect, useState } from "react";
6
import { env } from "next-runtime-env";
7
8
export default function Auth() {
9
+ useEffect(() => {
10
+ if (localStorage.getItem("id")) {
11
+ window.location.href = "/create";
12
+ }
13
+ }, []);
14
const [email, setEmail] = useState("");
15
const [password, setPassword] = useState("");
16
const [isLoading, setIsLoading] = useState(false);
0 commit comments