diff --git a/web/src/components/TextUI.tsx b/web/src/components/TextUI.tsx index 91566ac..00b9f61 100644 --- a/web/src/components/TextUI.tsx +++ b/web/src/components/TextUI.tsx @@ -59,9 +59,7 @@ const TextUI: React.FC = () => { borderRadius="md" maxW="xs" > - - {data.text} - + {data.text} diff --git a/web/src/components/features/menu/Item.tsx b/web/src/components/features/menu/Item.tsx index a26ca21..10e9369 100644 --- a/web/src/components/features/menu/Item.tsx +++ b/web/src/components/features/menu/Item.tsx @@ -16,84 +16,92 @@ const Item: React.FC<{ option: [string, Option]; }> = ({ option }) => { return ( - - - - - - - - {option[0]} - - - {option[1].description && ( + <> + + + + + - {option[1].description} + + {option[0]} + + {option[1].description && ( + + {option[1].description} + + )} + + {option[1].subMenu && ( + <> + + + + + )} - - {option[1].subMenu && ( - <> - - + + {option[1].metadata && ( + - - - - )} - - - - - {option[1]?.metadata && Array.isArray(option[1].metadata) ? ( - option[1].metadata.map((metadata: string, index: number) => ( - {metadata} - )) - ) : ( - <> - {typeof option[1].metadata === "object" && - Object.entries(option[1].metadata).map( - (metadata: { [key: string]: any }, index) => ( + + {Array.isArray(option[1].metadata) ? ( + option[1].metadata.map( + (metadata: string, index: number) => ( - {metadata[0]}: {metadata[1]} + {metadata} ) - )} - - )} - - - - - - + ) + ) : ( + <> + {typeof option[1].metadata === "object" && + Object.entries(option[1].metadata).map( + (metadata: { [key: string]: any }, index) => ( + + {metadata[0]}: {metadata[1]} + + ) + )} + + )} + + + )} + + + + + ); };