feat: main Added ability to render identical keys using key content hack

This commit is contained in:
Nikolaj Frey 2023-07-02 00:39:02 +10:00
parent ae6be981bb
commit 64396604ed
2 changed files with 8 additions and 1 deletions

View File

@ -197,6 +197,10 @@ export const Thingtime = props => {
if (props?.path?.human?.includes?.('hidden')) { if (props?.path?.human?.includes?.('hidden')) {
return null return null
} }
if (props?.path?.human?.includes?.('unique')) {
// take only path from before the string unique
return props?.path?.human?.split?.('unique')?.[0]
}
return ( return (
<Flex maxW='100%' pl={pl} wordBreak={'break-all'} fontSize='12px'> <Flex maxW='100%' pl={pl} wordBreak={'break-all'} fontSize='12px'>
{props?.path?.human} {props?.path?.human}

View File

@ -31,7 +31,10 @@ export const ThingtimeDemo = props => {
{ {
name: 'three' name: 'three'
} }
] ],
'...unique1': "I'm unique",
'...unique2': "I'm unique",
'...unique3': "I'm unique"
} }
const [demoThing, setDemoThing] = React.useState(thing) const [demoThing, setDemoThing] = React.useState(thing)