diff --git a/app/(auth)/signup/page.tsx b/app/(auth)/signup/page.tsx index e534c9f..579a047 100644 --- a/app/(auth)/signup/page.tsx +++ b/app/(auth)/signup/page.tsx @@ -12,7 +12,8 @@ export default function SignUp() { const [note, setNote] = useState("") const [type, setType] = useState("password") const [eye, setEye] = useState("relative top-10 left-72 text-balck") - const [eyeval, setEyeval] = useState("") + const [nlink, setNlink] = useState("") + const [check, setCheck] = useState("false") function changeStatus() { if(type == "password") { @@ -29,6 +30,8 @@ export default function SignUp() { if(mssv.length == 0) { setClassnameE("border border-red-600 hover:border-sky-500 w-full h-14 rounded-lg px-2") setNote("Bạn phải nhập MSSV") + setCheck("false") + setNlink("") } else { setClassnameE("border hover:border-sky-500 w-full h-14 rounded-lg px-2") @@ -37,6 +40,8 @@ export default function SignUp() { if(password.length == 0) { setClassnameP("border border-red-600 hover:border-sky-500 w-full h-14 rounded-lg px-2") setNote("Bạn phải nhập mật khẩu") + setCheck("false") + setNlink("") } else { setClassnameP("border hover:border-sky-500 w-full h-14 rounded-lg px-2") @@ -44,9 +49,13 @@ export default function SignUp() { if(mssv.length == 0 && password.length == 0) { setNote("Bạn phải nhập MSSV và mật khẩu") + setCheck("false") + setNlink("") } if(mssv.length > 0 && password.length > 0) { setNote("") + setCheck("true") + setNlink("/signin") } } @@ -62,18 +71,18 @@ export default function SignUp() {
-
-
- +
+
+

setMssv(evt.target.value)} />
-
-
- +
+
+
@@ -84,16 +93,16 @@ export default function SignUp() { setPassword(evt.target.value)} />
-
-
+
+


-
-
- +
+
+


@@ -108,7 +117,7 @@ export default function SignUp() { + onClick={() => handleClick()}> Next
diff --git a/components/layouts/Header.tsx b/components/layouts/Header.tsx index f098359..8169919 100644 --- a/components/layouts/Header.tsx +++ b/components/layouts/Header.tsx @@ -149,4 +149,4 @@ export default function Header() { }
); -} +} \ No newline at end of file