From 1d99943361a5f901ea07cbf9f5936fbd13a21d66 Mon Sep 17 00:00:00 2001 From: rizrmd Date: Sun, 19 May 2024 03:58:29 -0700 Subject: [PATCH] cleaning --- comps/form/field/type/TypeSingleOption.tsx | 8 ++-- comps/form/field/type/TypeSwitch.tsx | 46 ---------------------- 2 files changed, 3 insertions(+), 51 deletions(-) diff --git a/comps/form/field/type/TypeSingleOption.tsx b/comps/form/field/type/TypeSingleOption.tsx index 582d04d..d805c41 100755 --- a/comps/form/field/type/TypeSingleOption.tsx +++ b/comps/form/field/type/TypeSingleOption.tsx @@ -1,11 +1,9 @@ -import { FC, useEffect } from "react"; +import { FC } from "react"; import { FMLocal, FieldLocal, FieldProp } from "../../typings"; -import { useLocal } from "@/utils/use-local"; -import get from "lodash.get"; -import { TypeDropdown } from "./TypeDropdown"; -import { FieldToggle } from "./TypeToggle"; import { FieldButton } from "./TypeButton"; +import { TypeDropdown } from "./TypeDropdown"; import { FieldRadio } from "./TypeRadio"; +import { FieldToggle } from "./TypeToggle"; export const SingleOption: FC<{ field: FieldLocal; diff --git a/comps/form/field/type/TypeSwitch.tsx b/comps/form/field/type/TypeSwitch.tsx index ece8816..5eb210b 100755 --- a/comps/form/field/type/TypeSwitch.tsx +++ b/comps/form/field/type/TypeSwitch.tsx @@ -1,4 +1,3 @@ - import { useLocal } from "@/utils/use-local"; import { FC } from "react"; @@ -9,17 +8,6 @@ export const FieldTypeSwitch: FC<{ label?: string; }> = ({ valueName, description, label }) => { const local = useLocal({ checked: false }); - // const FormSchema = z.object({ - // valueName: z.boolean().default(false).optional(), - // }); - // const form = useForm>({ - // resolver: zodResolver(FormSchema), - // }); - - // function onSubmit(data: z.infer) { - // console.log({ data }); - // } - return (
{ @@ -29,39 +17,5 @@ export const FieldTypeSwitch: FC<{ > {JSON.stringify(local.checked)}
- //
- // - //
- //

- // {label != undefined ? label : "-"} - //

- //
- // ( - // - //
- // - // {label != undefined ? label : "-"} - // - // - // {description != undefined ? description : "-"} - // - //
- // - // - // - //
- // )} - // /> - //
- //
- // - //
- // ); };