|
@@ -35,12 +35,24 @@ const getCashBackApi = async () => {
|
|
|
})
|
|
|
.then((res) => {
|
|
|
return res.data;
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ return {
|
|
|
+ rules: [],
|
|
|
+ last_period: { end_time: 0, start_time: 0 },
|
|
|
+ next_period: {
|
|
|
+ end_time: 0,
|
|
|
+ start_time: 0,
|
|
|
+ },
|
|
|
+ amount: 0,
|
|
|
+ bet: 0,
|
|
|
+ status: "expired",
|
|
|
+ };
|
|
|
});
|
|
|
};
|
|
|
const CashbackInfo = async () => {
|
|
|
const vipInfo = await getVipInfoApi();
|
|
|
const cashbackInfo = await getCashBackApi();
|
|
|
- console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 43`, cashbackInfo);
|
|
|
|
|
|
const currentGrade = cashbackInfo.rules?.find(
|
|
|
(item) => item.level === (vipInfo.vip_level || 1)
|