import Widget from "./Widget"; import { Stack, Box, Field, Input, Button, Text } from "@chakra-ui/react"; import { useForm } from "react-hook-form"; import { useState } from "react"; export default function AlertLevel({id, isEditable, isDelete, DeleteWidget}) { const { register, handleSubmit } = useForm(); const onSubmit = (data) => { console.log(data); setIsSubmit(true); } const [isSubmit, setIsSubmit] = useState(false); // Prop Forwarding const widgetProps = { id, isEditable, isDelete, DeleteWidget, isSubmit, setIsSubmit } return ( {!isSubmit ? ( Country Name Volcano Name ):( Alert Level Data Coming Soon. )} ); }