-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
113 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
// import AboutAyurveda from "@/components/(patient)/home/AboutAyurveda"; | ||
// import ImageSlider from "@/components/(patient)/home/ImageSlider"; | ||
// import WhyUs from "@/components/(patient)/home/WhyUs"; | ||
// import AboutAyurveda from "@/components/patient/home/AboutAyurveda"; | ||
// import ImageSlider from "@/components/patient/home/ImageSlider"; | ||
// import WhyUs from "@/components/patient/home/WhyUs"; | ||
// import dynamic from "next/dynamic"; | ||
// import Loader from "@/components/common/Loader"; | ||
|
||
// const FeaturesList = dynamic(()=>import("@/components/(patient)/home/FeatureList"),{ | ||
// const FeaturesList = dynamic(()=>import("@/components/patient/home/FeatureList"),{ | ||
// loading:()=><Loader />, | ||
// }) | ||
|
||
|
||
const Page = () => { | ||
const HomePage = () => { | ||
return ( | ||
<section className="mx-auto "> | ||
{/* <ImageSlider /> | ||
<AboutAyurveda /> | ||
<WhyUs /> | ||
<FeaturesList /> */} | ||
Home Page is not available due to overload 💪💪💪💪 | ||
<div className="text-2xl font-bold text-center my-28 mb-64"> | ||
🚧 Hold your horses! 🐴 | ||
<br /> | ||
Iam currently working on some awesome animations and large items. | ||
<br /> | ||
Check back soon for a breathtaking experience! 🌟 | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default Page; | ||
export default HomePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { Dispatch, SetStateAction } from "react"; | ||
import { useForm } from "react-hook-form"; | ||
import { zodResolver } from "@hookform/resolvers/zod"; | ||
import * as z from "zod"; | ||
import { | ||
AlertDialog, | ||
AlertDialogTitle, | ||
AlertDialogContent, | ||
AlertDialogDescription, | ||
AlertDialogFooter, | ||
AlertDialogCancel, | ||
AlertDialogAction, | ||
AlertDialogHeader, | ||
} from "@/components/ui/alert-dialog"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Form } from "@/components/ui/form"; | ||
import SubmitButton from "../common/SubmitButton"; | ||
import CustomFormField from "../common/CustomFormField"; | ||
import { FormFieldType } from "@/types/fromTypes"; | ||
|
||
type Props = { | ||
isOpen: boolean; | ||
setIsOpen: Dispatch<SetStateAction<boolean>>; | ||
}; | ||
|
||
const formSchema = z.object({ | ||
email: z.string().email("Please enter a valid email address."), | ||
}); | ||
|
||
type FormValues = z.infer<typeof formSchema>; | ||
|
||
const ForgotPasswordModal = ({ isOpen, setIsOpen }: Props) => { | ||
const form = useForm<FormValues>({ | ||
resolver: zodResolver(formSchema), | ||
defaultValues: { | ||
email: "", | ||
}, | ||
}); | ||
|
||
const { control, handleSubmit, formState: { isSubmitting } } = form; | ||
|
||
const onSubmit = async (data: FormValues) => { | ||
try { | ||
await new Promise(resolve => setTimeout(resolve, 2000)); | ||
console.log("Password reset email sent to:", data.email); | ||
setIsOpen(false); | ||
} catch (error) { | ||
console.error("Error sending password reset email:", error); | ||
} | ||
}; | ||
|
||
return ( | ||
<AlertDialog open={isOpen} onOpenChange={setIsOpen}> | ||
<AlertDialogContent> | ||
<AlertDialogHeader> | ||
<AlertDialogTitle>Forgot Password</AlertDialogTitle> | ||
<AlertDialogDescription> | ||
Enter your email address and we'll send you instructions to reset your password. | ||
</AlertDialogDescription> | ||
</AlertDialogHeader> | ||
<Form {...form}> | ||
<form onSubmit={handleSubmit(onSubmit)} className="space-y-4"> | ||
<CustomFormField | ||
fieldType={FormFieldType.INPUT} | ||
control={control} | ||
name="email" | ||
label="Email Address *" | ||
placeholder="[email protected]" | ||
iconSrc="/assets/icons/email.svg" | ||
/> | ||
<AlertDialogFooter className="mt-6"> | ||
<AlertDialogCancel asChild> | ||
<Button variant="ghost" onClick={() => setIsOpen(false)}> | ||
Cancel | ||
</Button> | ||
</AlertDialogCancel> | ||
<AlertDialogAction asChild> | ||
<SubmitButton isLoading={isSubmitting} variant="outline" className="bg-slate-500 bg-opacity-40" > | ||
Send Reset Instructions | ||
</SubmitButton> | ||
</AlertDialogAction> | ||
</AlertDialogFooter> | ||
</form> | ||
</Form> | ||
</AlertDialogContent> | ||
</AlertDialog> | ||
); | ||
}; | ||
|
||
export default ForgotPasswordModal; |