From 9b96d53754e1f4571939a5046926bb55e9a55aa8 Mon Sep 17 00:00:00 2001 From: Allen Date: Fri, 8 Dec 2023 21:34:24 -0800 Subject: [PATCH] remove DisplayData --- app/admin/AccordionInputForm.tsx | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/app/admin/AccordionInputForm.tsx b/app/admin/AccordionInputForm.tsx index cb897bc..4efc308 100644 --- a/app/admin/AccordionInputForm.tsx +++ b/app/admin/AccordionInputForm.tsx @@ -33,36 +33,6 @@ function getDefaultValuesFromSchema( return values; } -function DisplayData({ data }: { data: any }) { - if (typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') { - return

{data.toString()}

; - } - if (Array.isArray(data)) { - return ( -
- {data.map((item, index) => ( - - ))} -
- ); - } - - if (typeof data === 'object' && data !== null) { - return ( -
- {Object.keys(data).map((key) => ( -
- {key}: - -
- ))} -
- ); - } - - return null; // fallback for unsupported data types -} - type NestedFieldProps = { control: any; name: string;