diff --git a/.DS_Store b/.DS_Store index 5291e9a..6525920 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Backend/.DS_Store b/Backend/.DS_Store index 373aa8d..438127b 100644 Binary files a/Backend/.DS_Store and b/Backend/.DS_Store differ diff --git a/Frontend/components/Modals/ModalSignIn.tsx b/Frontend/components/Modals/ModalSignIn.tsx index bf3b47a..ac090d4 100644 --- a/Frontend/components/Modals/ModalSignIn.tsx +++ b/Frontend/components/Modals/ModalSignIn.tsx @@ -1,3 +1,5 @@ +"use client"; + import React from "react"; import Icon from "@/components/Icons/Icon"; import { useForm } from "react-hook-form"; @@ -5,9 +7,11 @@ import { yupResolver } from "@hookform/resolvers/yup"; import { signInValidationSchema } from "@/utils/form"; import { login } from "@/app/actions"; import { toast } from "react-toastify"; -import pb from "@/lib/pocketbase"; +import { useRouter } from "next/navigation"; function ModalSignIn() { + const router = useRouter(); + const { register, handleSubmit, @@ -25,6 +29,7 @@ function ModalSignIn() { ) { reset(); document.getElementById("sign-in-modal")?.click(); + router.push("/account"); } } catch (error) { if (error instanceof Error) { @@ -96,14 +101,31 @@ function ModalSignIn() {
- +
+ +
+ + Dont have an account?{" "} + + + { + document.getElementById("sign-in-modal")?.click(); + document.getElementById("sign-up-modal")?.click(); + }} + className="text-primary hover:text-primary/60 cursor-pointer " + > + Sign up + +
+
- +
+ +
+ + Already have an account?{" "} + + + { + document.getElementById("sign-up-modal")?.click(); + document.getElementById("sign-in-modal")?.click(); + }} + className="text-primary hover:text-primary/60 cursor-pointer " + > + Sign in + +
+