Skip to content

Commit

Permalink
issue solved
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanptm committed Aug 30, 2024
1 parent 3cddc48 commit d44354b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
6 changes: 0 additions & 6 deletions client/app/(patient)/register/page.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="flex h-screen max-h-screen">
Expand Down
7 changes: 1 addition & 6 deletions client/app/(patient)/signin/(.)otp-verification/page.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<OtpVerificationModel
returnRoute="/signin"
Expand Down
7 changes: 1 addition & 6 deletions client/app/(patient)/signin/otp-verification/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ import Image from "next/image";
import { FormEvent, useState } from "react";
import { useValidateOtpPatient } from "@/hooks/usePatientAuth";
import { useToast } from "@/components/ui/use-toast";
import { notFound, useRouter } from "next/navigation";
import { useRouter } from "next/navigation";
import { Button } from "@/components/ui/button";
import Link from "next/link";
import { Banners } from "@/constants";
import { useAuth } from "@/hooks/useAuth";

const OtpVerificationPage = () => {
const [otp, setOtp] = useState<string>("");
const { mutate: validateOtp, isPending } = useValidateOtpPatient();
const { toast } = useToast();
const navigate = useRouter();
const {patientToken} = useAuth();
if(patientToken){
notFound();
}

const handleVerify = async (e: FormEvent) => {
e.preventDefault();
Expand Down

1 comment on commit d44354b

@vercel
Copy link

@vercel vercel bot commented on d44354b Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.