Revert "Merge branch 'feature/gas-filter' into 'main'"
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
import Widget from "./Widget";
|
||||
import { Stack, Box, Field, Input, Button, ButtonGroup, Text, Flex } from "@chakra-ui/react";
|
||||
import { Stack, Box, Field, Input, Button, Text, Flex } from "@chakra-ui/react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { useState } from "react";
|
||||
import { LuAsterisk } from "react-icons/lu";
|
||||
import { CancelButton } from "./CancelButton.jsx";
|
||||
|
||||
|
||||
export default function AlertLevel({id, isEditable, isDelete, DeleteWidget}) {
|
||||
const { register, handleSubmit, reset, formState: {errors} } = useForm();
|
||||
|
||||
const onSubmit = (data) => {
|
||||
console.log("data: ", data);
|
||||
if (data.volcanoname === '') {
|
||||
@@ -17,10 +14,6 @@ export default function AlertLevel({id, isEditable, isDelete, DeleteWidget}) {
|
||||
setIsSubmit(true);
|
||||
reset();
|
||||
}
|
||||
const onCancel = () => {
|
||||
reset();
|
||||
setIsSubmit(false);
|
||||
}
|
||||
const [isSubmit, setIsSubmit] = useState(false);
|
||||
|
||||
// Prop Forwarding
|
||||
@@ -39,7 +32,7 @@ export default function AlertLevel({id, isEditable, isDelete, DeleteWidget}) {
|
||||
pr={3}
|
||||
display="flex"
|
||||
flexDir="column"
|
||||
gap={12}
|
||||
gap="10"
|
||||
>
|
||||
<Field.Root orientation="horizontal">
|
||||
<Stack direction="column" gap="3" width="100%">
|
||||
@@ -63,12 +56,7 @@ export default function AlertLevel({id, isEditable, isDelete, DeleteWidget}) {
|
||||
</Flex>
|
||||
</Stack>
|
||||
</Field.Root>
|
||||
<Flex justify ="flex-end" gap = {2}>
|
||||
<ButtonGroup size="sm" variant="solid">
|
||||
<Button type="submit">Submit</Button>
|
||||
<CancelButton onCancel ={onCancel}/>
|
||||
</ButtonGroup>
|
||||
</Flex>
|
||||
<Button type="submit" size="sm">Submit</Button>
|
||||
</Box>
|
||||
):(
|
||||
// DISPLAYING ALERT LEVEL DATA
|
||||
|
||||
Reference in New Issue
Block a user