|
@@ -24,6 +24,7 @@ const Deposit = () => {
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
getData();
|
|
|
+ // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
}, []);
|
|
|
|
|
|
React.useEffect(() => {
|
|
@@ -31,6 +32,17 @@ const Deposit = () => {
|
|
|
getInfo(id);
|
|
|
}, [actIdx, shopTypeList]);
|
|
|
|
|
|
+ React.useEffect(() => {
|
|
|
+ if (!shopInfo || (shopInfo.id === 1 && shopInfo.num <= 0)) {
|
|
|
+ setShopTypeList((listValue) => {
|
|
|
+ return listValue.filter((item) => {
|
|
|
+ return item.id !== 1;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
+ }, [shopInfo]);
|
|
|
+
|
|
|
const getData = async () => {
|
|
|
const res = await getShopListApi();
|
|
|
if (res?.code === 200 && res?.data) {
|