Skip to content

Commit

Permalink
Add meme nov (#629)
Browse files Browse the repository at this point in the history
* update meme Nov

* fix: update walletConnect version to 7.9.1

* Fix meme chart

---------

Co-authored-by: lq0-github <[email protected]>
Co-authored-by: naturexie <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent 90c7bd8 commit 583fda0
Show file tree
Hide file tree
Showing 6 changed files with 268 additions and 501 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"@near-wallet-selector/nightly": "^8.9.7",
"@near-wallet-selector/okx-wallet": "^8.9.10",
"@near-wallet-selector/sender": "^8.9.7",
"@near-wallet-selector/wallet-connect": "^7.9.1",
"@near-wallet-selector/wallet-connect": "7.9.1",
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.7.1/react-icons-all-files-4.7.1.tgz",
"@tanstack/react-query": "^5.56.2",
"@transak/transak-sdk": "1.2.2",
Expand Down
4 changes: 2 additions & 2 deletions src/components/meme/MemeVoteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ function MemeVoteModal(props: any) {
<OprationButton
minWidth="7rem"
disabled={disabled}
// onClick={openMemeVoteConfirmModal}
onClick={stakeToken}
onClick={openMemeVoteConfirmModal}
// onClick={stakeToken}
className={`flex flex-grow items-center justify-center bg-greenLight text-boxBorder mt-6 rounded-xl h-12 text-base gotham_bold focus:outline-none ${
disabled || memeVoteLoading ? 'opacity-40' : ''
}`}
Expand Down
34 changes: 17 additions & 17 deletions src/components/meme/StakingChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ const StakingChart = ({ chartType }) => {
const meme_winner_tokens = memeDataConfig.meme_winner_tokens;
const displaySeeds = useMemo(() => {
if (emptyObject(seeds)) return {};
return meme_winner_tokens.reduce(
(acc: any, memeTokenId: string | number) => ({
...acc,
...{ [memeTokenId]: seeds[memeTokenId] },
}),
{}
) as Record<string, Seed>;
// return Object.entries(MEME_TOKEN_XREF_MAP).reduce((acc, [memeTokenId]) => {
// const seed = seeds[memeTokenId];
// if (seed && !coming_offline_soon_token.includes(memeTokenId)) {
// return {
// ...acc,
// [memeTokenId]: seed,
// };
// }
// return acc;
// }, {} as Record<string, Seed>);
// return meme_winner_tokens.reduce(
// (acc: any, memeTokenId: string | number) => ({
// ...acc,
// ...{ [memeTokenId]: seeds[memeTokenId] },
// }),
// {}
// ) as Record<string, Seed>;
return Object.entries(MEME_TOKEN_XREF_MAP).reduce((acc, [memeTokenId]) => {
const seed = seeds[memeTokenId];
if (seed && !coming_offline_soon_token.includes(memeTokenId)) {
return {
...acc,
[memeTokenId]: seed,
};
}
return acc;
}, {} as Record<string, Seed>);
}, [seeds, MEME_TOKEN_XREF_MAP]);

useEffect(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/meme/countdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const Countdown = ({ onCountdownFinish }) => {
const is_mobile = isMobile();
useEffect(() => {
const targetDate = new Date(
Date.UTC(new Date().getUTCFullYear(), 9, 1, 0, 0, 0)
Date.UTC(new Date().getUTCFullYear(), 10, 1, 0, 0, 0) // 11月1日
);
const endDate = new Date(
Date.UTC(new Date().getUTCFullYear(), 9, 5, 0, 0, 0)
Date.UTC(new Date().getUTCFullYear(), 10, 5, 0, 0, 0) // 11月5日
);
const updateCountdown = () => {
const nowUtc = Date.now();
Expand Down Expand Up @@ -66,7 +66,7 @@ const Countdown = ({ onCountdownFinish }) => {
</div>
{!is_mobile ? (
<div className="absolute -right-1 top-0 xsm:hidden">
<CountdownLeftBg style={{ height: '240px' }} />
<CountdownLeftBg />
</div>
) : null}

Expand Down
190 changes: 104 additions & 86 deletions src/components/meme/icons.tsx

Large diffs are not rendered by default.

Loading

0 comments on commit 583fda0

Please sign in to comment.