diff --git a/remix/app/components/MagicInput/MagicInput.tsx b/remix/app/components/MagicInput/MagicInput.tsx index 3f2502e..d5dfae5 100644 --- a/remix/app/components/MagicInput/MagicInput.tsx +++ b/remix/app/components/MagicInput/MagicInput.tsx @@ -8,6 +8,12 @@ export const MagicInput = (props) => { const [inputValue, setInputValue] = React.useState() + const [isClientSide, setIsClientSide] = React.useState(false) + + React.useEffect(() => { + setIsClientSide(true) + }, []) + const contentEditableRef = React.useRef(null) const editValueRef = React.useRef({}) @@ -147,7 +153,7 @@ export const MagicInput = (props) => { position="absolute" top={0} left={0} - display={inputValue ? "none" : "block"} + display={inputValue || !isClientSide ? "none" : "block"} width="100%" maxWidth="100%" color="greys.dark" diff --git a/remix/app/components/Thingtime/SettingsMenu.tsx b/remix/app/components/Thingtime/SettingsMenu.tsx index 1cd6caa..4371203 100644 --- a/remix/app/components/Thingtime/SettingsMenu.tsx +++ b/remix/app/components/Thingtime/SettingsMenu.tsx @@ -19,7 +19,14 @@ export const SettingsMenu = (props) => { }, []) const types = React.useMemo(() => { - const ret = ["any", "object", "array", "string", "number", "boolean"] + const ret = [ + { label: "any", icon: "any" }, + "object", + "array", + "string", + "number", + "boolean", + ] return ret }, []) @@ -29,13 +36,22 @@ export const SettingsMenu = (props) => { }, [props?.onChangeType] ) + const onDelete = React.useCallback( + (type) => { + props?.onDelete?.() + }, + [props?.onDelete] + ) const iconSize = 10 return (