fix: handle error
This commit is contained in:
parent
8d455f08cc
commit
a1f0df3a69
@ -190,7 +190,11 @@ function TariffPage() {
|
||||
return;
|
||||
}
|
||||
|
||||
const [discounts] = await getDiscounts(userId);
|
||||
const [discounts, discountsError] = await getDiscounts(userId);
|
||||
|
||||
if (discountsError) {
|
||||
throw new Error(discountsError);
|
||||
}
|
||||
|
||||
if (discounts?.length) {
|
||||
setDiscounts(discounts);
|
||||
|
||||
@ -29,6 +29,7 @@ export function CheckFastlink() {
|
||||
setDiscounts(discounts);
|
||||
}
|
||||
};
|
||||
|
||||
get();
|
||||
}, []);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user