fix undefined currency
parent
ade7f30f31
commit
a722836b70
|
@ -22,7 +22,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const { getAppData, setAppData, disabled } = useAppContextWithSchema<typeof appDataSchema>();
|
const { getAppData, setAppData, disabled } = useAppContextWithSchema<typeof appDataSchema>();
|
||||||
const price = getAppData("price");
|
const price = getAppData("price");
|
||||||
const currency = getAppData("currency");
|
const currency = getAppData("currency") || currencyOptions[0].value;
|
||||||
const [selectedCurrency, setSelectedCurrency] = useState(
|
const [selectedCurrency, setSelectedCurrency] = useState(
|
||||||
currencyOptions.find((c) => c.value === currency) || {
|
currencyOptions.find((c) => c.value === currency) || {
|
||||||
label: currencyOptions[0].label,
|
label: currencyOptions[0].label,
|
||||||
|
|
Loading…
Reference in New Issue