From 083a51d3b7ab88f66dee458813f851bf449dd5e1 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Mon, 18 May 2026 12:39:54 -0400 Subject: [PATCH] fix(ui): widen DefaultQrLogoSection prop type to accept 'wownero' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to the previous commit — page.tsx now passes default_qr_logo of type "wownero" | "monero" | "none" | "custom" to this component, but the prop was still typed as the narrower "monero" | "none" | "custom" set. Next build failed with TS2322. Widened initialLogo prop + the internal useState + buildInitialState helper to match. --- ui/components/default-qr-logo-section.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/components/default-qr-logo-section.tsx b/ui/components/default-qr-logo-section.tsx index 77b1cf0..d9ec1a5 100644 --- a/ui/components/default-qr-logo-section.tsx +++ b/ui/components/default-qr-logo-section.tsx @@ -10,7 +10,7 @@ import { type DefaultQrLogoState, } from "../app/(app)/dashboard/actions"; -const buildInitialState = (logo: "monero" | "none" | "custom", logoDataUrl: string | null) => ({ +const buildInitialState = (logo: "wownero" | "monero" | "none" | "custom", logoDataUrl: string | null) => ({ logo, logoDataUrl, error: null, @@ -21,11 +21,11 @@ export default function DefaultQrLogoSection({ initialLogo, initialLogoDataUrl, }: { - initialLogo: "monero" | "none" | "custom"; + initialLogo: "wownero" | "monero" | "none" | "custom"; initialLogoDataUrl: string | null; }) { const router = useRouter(); - const [logo, setLogo] = useState<"monero" | "none" | "custom">(initialLogo); + const [logo, setLogo] = useState<"wownero" | "monero" | "none" | "custom">(initialLogo); const [logoDataUrl, setLogoDataUrl] = useState(initialLogoDataUrl); const [state, formAction] = useFormState( updateDefaultQrLogoAction,