diff --git a/src/Providers/StoreProvider/index.tsx b/src/Providers/StoreProvider/index.tsx
index fe0742f79..eb3f58eff 100644
--- a/src/Providers/StoreProvider/index.tsx
+++ b/src/Providers/StoreProvider/index.tsx
@@ -1,8 +1,11 @@
'use client';
-import { AppStore, store } from '@/stores';
+import AppLoading from '@/components/AppLoading';
+import { AppStore, persistor, store } from '@/stores';
+import { Center } from '@chakra-ui/react';
import React, { useRef } from 'react';
import { Provider } from 'react-redux';
+import { PersistGate } from 'redux-persist/integration/react';
// import useBootstrapApp from '@/hooks/useBootstrapApp';
@@ -18,5 +21,11 @@ export default function StoreProvider({
storeRef.current = store;
}
- return {children};
+ return (
+
+ >} persistor={persistor}>
+ {children}
+
+
+ );
}
diff --git a/src/modules/airdrop/Section_2/index.tsx b/src/modules/airdrop/Section_2/index.tsx
index 3a075bcd6..c09fd55b5 100644
--- a/src/modules/airdrop/Section_2/index.tsx
+++ b/src/modules/airdrop/Section_2/index.tsx
@@ -105,125 +105,6 @@ const Section_2 = () => {
}
};
- const renderItem = (item: IContent, index: number) => {
- return (
-
- {/* Date */}
-
- {item.dateStr}
-
-
- {/* Content */}
-
- {/* ThumbImg */}
-
-
- {/* Right - Content */}
-
-
- {item.twitterLink && (
-
-
-
- {item.appName}
-
-
- )}
-
-
-
-
- {item.linkShortName}
-
-
-
-
-
-
- {item.title}
-
-
-
- {item.desc}
-
-
-
-
-
-
-
-
-
- );
- };
-
return (
void;
+ loading?: boolean;
}
export default function ItemCommunity({
@@ -66,14 +66,14 @@ export default function ItemCommunity({
content,
isLoading,
onClickTweetToClaim,
+ loading,
}: {
index: number;
content: IItemCommunity;
isLoading?: boolean;
onClickTweetToClaim: (airdropType: AirdropStep) => void;
+ loading?: boolean;
}) {
- console.log('content', content);
-
const [isEnd, setIsEnd] = React.useState(
dayjs
.utc(content?.expiredTime, 'YYYY-MM-DD HH:mm:ss')
@@ -81,13 +81,13 @@ export default function ItemCommunity({
);
const { isActive, image, isDisable = false, step } = content;
const airdropAlphaUsers = useSelector(airdropAlphaUsersSelector);
- const airdropGMHolders = AirdropStorage.getAirdropGMHolders();
- const airdropGenerativeUsers = AirdropStorage.getAirdropGenerativeUsers();
- const airdropPerceptronsHolders =
- AirdropStorage.getAirdropPerceptronsHolders();
const user = useAppSelector(userSelector);
- const isConnectMetaMask = AirdropStorage.getIsConnectMetaMask();
- const isConnectBitcoinWallet = AirdropStorage.getIsConnectBitcoinWallet();
+
+ const airdrops = useSelector(airdropSelector).airdrops;
+
+ const airdropContent = useMemo(() => {
+ return airdrops.find((v) => compareString(v.type, content.step));
+ }, [airdrops, content]);
const isRunning = useMemo(() => {
return isActive;
@@ -190,7 +190,7 @@ export default function ItemCommunity({