fix(ui): widen DefaultQrLogoSection prop type to accept 'wownero'

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.
This commit is contained in:
jwinterm
2026-05-18 12:39:54 -04:00
parent 7cebe309aa
commit 083a51d3b7
+3 -3
View File
@@ -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<string | null>(initialLogoDataUrl);
const [state, formAction] = useFormState(
updateDefaultQrLogoAction,