mirror of
https://github.com/Such-Software/wowcheckout.git
synced 2026-10-17 05:51:45 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user