From 5c22554a3a51ed60f8617e12dea994c78c1d9dfc Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Mon, 10 Mar 2025 14:40:17 +0100 Subject: [PATCH] :recycle: [#445] Simplify AppDebug implementation Dropped the value prop in favour of always passing children. --- src/components/AppDebug.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/AppDebug.tsx b/src/components/AppDebug.tsx index 7e5ba2791..b4f7323b6 100644 --- a/src/components/AppDebug.tsx +++ b/src/components/AppDebug.tsx @@ -6,14 +6,13 @@ import {getVersion} from '@/utils'; export interface DebugInfoProps { label: string; - value?: string; children?: React.ReactNode; } -const DebugInfo: React.FC = ({label, value, children}) => ( +const DebugInfo: React.FC = ({label, children}) => (
{label}
-
{value ?? children}
+
{children}
); @@ -22,7 +21,7 @@ const AppDebug: React.FC = () => { const [{expiry}] = useGlobalState(sessionExpiresAt); return (
- + {locale} {expiry ? ( <>