Fix extra data resetting

This commit is contained in:
Bill 2022-03-17 13:35:30 -04:00
parent 06a2fe059e
commit 323a2e3804

View File

@ -131,8 +131,11 @@ export const CatalogPurchaseWidgetView: FC<CatalogPurchaseWidgetViewProps> = pro
{ {
if(!currentOffer) return; if(!currentOffer) return;
return () =>
{
setPurchaseState(CatalogPurchaseState.NONE); setPurchaseState(CatalogPurchaseState.NONE);
setPurchaseOptions({ quantity: 1, extraData: '', extraParamRequired: false, previewStuffData: null }); setPurchaseOptions({ quantity: 1, extraData: '', extraParamRequired: false, previewStuffData: null });
}
}, [ currentOffer, setPurchaseOptions ]); }, [ currentOffer, setPurchaseOptions ]);
useEffect(() => useEffect(() =>