From d44354b5b70b46d2305de9a999c48fb368349df7 Mon Sep 17 00:00:00 2001 From: Sinan Date: Fri, 30 Aug 2024 16:30:07 +0530 Subject: [PATCH] issue solved --- client/app/(patient)/register/page.tsx | 6 ------ client/app/(patient)/signin/(.)otp-verification/page.tsx | 7 +------ client/app/(patient)/signin/otp-verification/page.tsx | 7 +------ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/client/app/(patient)/register/page.tsx b/client/app/(patient)/register/page.tsx index 506f0d48..a375ddc6 100644 --- a/client/app/(patient)/register/page.tsx +++ b/client/app/(patient)/register/page.tsx @@ -1,13 +1,7 @@ import Image from "next/image"; import RegistrationForm from "@/components/forms/patient/RegistrationForm"; import { Banners } from "@/constants"; -import { useAuth } from "@/hooks/useAuth"; -import { notFound } from "next/navigation"; const Register = () => { - const {patientToken} = useAuth(); - if(patientToken){ - notFound(); - } return (
diff --git a/client/app/(patient)/signin/(.)otp-verification/page.tsx b/client/app/(patient)/signin/(.)otp-verification/page.tsx index 33f32808..6799a6bb 100644 --- a/client/app/(patient)/signin/(.)otp-verification/page.tsx +++ b/client/app/(patient)/signin/(.)otp-verification/page.tsx @@ -1,18 +1,13 @@ "use client"; import { FormEvent } from "react"; import OtpVerificationModel from "@/components/models/OtpVerificationModel"; -import { useAuth } from "@/hooks/useAuth"; -import { notFound } from "next/navigation"; const OptInterceptor = () => { const handleVerify = (e: FormEvent) => { e.preventDefault(); }; const handleResend = () => {}; - const {patientToken} = useAuth(); - if(patientToken){ - notFound(); - } + return ( { const [otp, setOtp] = useState(""); const { mutate: validateOtp, isPending } = useValidateOtpPatient(); const { toast } = useToast(); const navigate = useRouter(); - const {patientToken} = useAuth(); - if(patientToken){ - notFound(); - } const handleVerify = async (e: FormEvent) => { e.preventDefault();