Commit a802fe22 by Arjun Jhukal

updated the photo id field by setting it to required

parent ac2dff15
"use client";
import { useAppSelector } from "@/hooks/hook";
import { Box, Button, Dialog, DialogContent, Typography } from "@mui/material";
import { useState } from "react";
import { useEffect, useState } from "react";
export default function AgeVerificationModal() {
const user = useAppSelector((state) => state.auth.user);
const [open, setOpen] = useState(true);
const handleConfirmAge = () => {
......@@ -13,6 +15,11 @@ export default function AgeVerificationModal() {
window.location.href = "about:blank";
};
useEffect(() => {
if (user) {
setOpen(false);
}
}, [user]);
return (
<Dialog
open={open}
......@@ -20,8 +27,8 @@ export default function AgeVerificationModal() {
disableEscapeKeyDown
sx={{
"& .MuiBackdrop-root": {
backdropFilter: "blur(8px)", // Blurs the background
backgroundColor: "rgba(0, 0, 0, 0.4)", // Semi-transparent dark overlay
backdropFilter: "blur(8px)",
backgroundColor: "rgba(0, 0, 0, 0.4)",
},
}}
>
......
......@@ -92,7 +92,7 @@ const validationSchema = Yup.object().shape({
first_name: Yup.string().required('First name is required'),
middle_name: Yup.string(),
last_name: Yup.string().required('Last name is required'),
photoid_number: Yup.string(),
photoid_number: Yup.string().required('Photo ID is required'),
city: Yup.string(),
pob: Yup.string(),
agree: Yup.boolean().required().oneOf([true], 'You must agree to the terms and conditions')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment