|
@@ -11,11 +11,10 @@ import { useTranslations } from "next-intl";
|
|
|
import { FC, Fragment, useLayoutEffect, useRef, useState } from "react";
|
|
|
|
|
|
import actions from "@/app/[locale]/(TabBar)/deposit/actions";
|
|
|
+import Empty from "@/components/Empty";
|
|
|
import "@/styles/deposit.scss";
|
|
|
import { server } from "@/utils/client";
|
|
|
-interface Props {
|
|
|
- deposits: DepositsTypes[];
|
|
|
-}
|
|
|
+interface Props {}
|
|
|
|
|
|
interface RewardsProps {
|
|
|
rewards: RewardsType[];
|
|
@@ -37,7 +36,7 @@ const RewardsText: FC<RewardsProps> = (props) => {
|
|
|
let text = "";
|
|
|
// 设置基础奖励文本
|
|
|
if (item.ratio > 0) {
|
|
|
- text = `${item.ratio}`;
|
|
|
+ text = `${item.ratio}%`;
|
|
|
} else {
|
|
|
text = `${item.reward}`;
|
|
|
}
|
|
@@ -74,7 +73,6 @@ const getDepositApi = async () => {
|
|
|
});
|
|
|
};
|
|
|
const DepositData: FC<Props> = (props) => {
|
|
|
- const { deposits } = props;
|
|
|
const t = useTranslations();
|
|
|
const userInfo = useUserInfoStore((state) => state.userInfo);
|
|
|
const [depositState, setDepositState] = useState<DepositsTypes[]>([]);
|
|
@@ -139,6 +137,9 @@ const DepositData: FC<Props> = (props) => {
|
|
|
setActiveType(data[0]);
|
|
|
});
|
|
|
}, []);
|
|
|
+
|
|
|
+ if (!depositState.length) return <Empty />;
|
|
|
+
|
|
|
return (
|
|
|
<div className="deposit-box">
|
|
|
<div className="img-box"></div>
|