From 64396604ed605bd5a61a01171717b2b563fae617 Mon Sep 17 00:00:00 2001 From: Nikolaj Frey Date: Sun, 2 Jul 2023 00:39:02 +1000 Subject: [PATCH] feat: main Added ability to render identical keys using key content hack --- remix/app/components/Thingtime/Thingtime.tsx | 4 ++++ remix/app/components/Thingtime/ThingtimeDemo.tsx | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/remix/app/components/Thingtime/Thingtime.tsx b/remix/app/components/Thingtime/Thingtime.tsx index 56eea58..6a9e4c7 100644 --- a/remix/app/components/Thingtime/Thingtime.tsx +++ b/remix/app/components/Thingtime/Thingtime.tsx @@ -197,6 +197,10 @@ export const Thingtime = props => { if (props?.path?.human?.includes?.('hidden')) { return null } + if (props?.path?.human?.includes?.('unique')) { + // take only path from before the string unique + return props?.path?.human?.split?.('unique')?.[0] + } return ( {props?.path?.human} diff --git a/remix/app/components/Thingtime/ThingtimeDemo.tsx b/remix/app/components/Thingtime/ThingtimeDemo.tsx index 135985e..418b372 100644 --- a/remix/app/components/Thingtime/ThingtimeDemo.tsx +++ b/remix/app/components/Thingtime/ThingtimeDemo.tsx @@ -31,7 +31,10 @@ export const ThingtimeDemo = props => { { name: 'three' } - ] + ], + '...unique1': "I'm unique", + '...unique2': "I'm unique", + '...unique3': "I'm unique" } const [demoThing, setDemoThing] = React.useState(thing)