Skip to content

Commit

Permalink
Meme activity 10month (#614)
Browse files Browse the repository at this point in the history
* feat: update meme config for 10 month

* feat: add gp.token0.near for check in

* feat: update meme banner

* feat: update kat farm

---------

Co-authored-by: naturexie <[email protected]>
  • Loading branch information
xieqiancaosissi and naturexie authored Oct 4, 2024
1 parent 8b3bb57 commit 4b5ee0e
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/meme/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Banner = () => {
<div className="relative flex items-center justify-center w-full mb-16">
<img
className="relative w-full z-10"
src="https://img.ref.finance/images/memeBannerPc_9months.png"
src="https://img.ref.finance/images/memeBannerPc_10months.png"
/>
<div className="absolute right-60 bottom-60 z-10 gap-7">
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/meme/MobileBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Banner = () => {
return (
<div className="relative flex flex-col items-center">
<div className="relative flex items-center justify-center w-full">
<img src="https://img.ref.finance/images/memeBannerMobile_9months.png" />
<img src="https://img.ref.finance/images/memeBannerMobile_10months.png" />
<div className="flex flex-col gap-3 absolute right-6 bottom-10 z-10">
<div className="" onClick={showRule}>
<MobileBannerCoreBtnIconBg />
Expand Down
4 changes: 2 additions & 2 deletions src/components/meme/Staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const Staking = () => {
<div className="xsm:bg-memeStakingBgColor xsm:border xsm:border-memeBorderColor xsm:rounded-2xl xsm:pt-8 xsm:pb-8 xsm:px-11">
<div className="lg:hidden mb-3 flex flex-col items-center">
<div className="text-base text-primaryText">Current Round:</div>
<div className="text-lg mb-4">2024/09/06-2024/10/05</div>
<div className="text-lg mb-4">2024/10/06-2024/11/05</div>
{/* <div className="text-base text-primaryText">Next Round:</div>
<div className="text-lg mb-6">2024/08/06-2024/09/05</div> */}
</div>
Expand All @@ -136,7 +136,7 @@ const Staking = () => {
<div className="flex justify-between mb-6 px-16 xsm:hidden">
<div className="text-left ">
<p className="text-sm text-primaryText mb-2">Current Round:</p>
<div className="text-sm ">2024/09/06-2024/10/05</div>
<div className="text-sm ">2024/10/06-2024/11/05</div>
</div>
{/* <div className="text-left">
<p className="text-sm text-primaryText mb-2">Next Round:</p>
Expand Down
29 changes: 19 additions & 10 deletions src/components/meme/StakingChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,27 @@ const StakingChart = ({ chartType }) => {
const { seeds, xrefSeeds, allTokenMetadatas } = useContext(MemeContext) || {};
const { MEME_TOKEN_XREF_MAP } = getMemeContractConfig();
const { coming_offline_soon_token } = getMemeDataConfig();
const memeDataConfig = getMemeDataConfig();
const meme_winner_tokens = memeDataConfig.meme_winner_tokens;
const displaySeeds = useMemo(() => {
if (emptyObject(seeds)) return {};
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
1 change: 0 additions & 1 deletion src/components/meme/VoteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ function VoteModel(props: any) {
xrefContractConfig?.[MEME_TOKEN_XREF_MAP[selectedTab]]
?.delay_withdraw_sec
)}{' '}
days.
</p>
</div>
</div>
Expand Down
9 changes: 5 additions & 4 deletions src/components/meme/memeConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ export function getMemeDataConfig(): any {
'usmeme.tg': '4949',
'nearnvidia.near': '4547',
'gear.enleap.near': '3411',
'kat.token0.near': '5391',
},
token_icon: {
'ftv2.nekotoken.near':
Expand All @@ -441,14 +442,13 @@ export function getMemeDataConfig(): any {
meme_winner_tokens: [
'blackdragon.tkn.near',
'token.lonkingnearbackto2024.near',
'touched.tkn.near',
'gear.enleap.near',
'token.0xshitzu.near',
'kat.token0.near',
],
meme_nonListed_tokens: [
'438e48ed4ce6beecf503d43b9dbd3c30d516e7fd.factory.bridge.near',
'gp.token0.near',
'kat.token0.near',
'chill-129.meme-cooking.near',
'benthedog.near',
],
Expand Down Expand Up @@ -478,11 +478,11 @@ export function getMemeDataConfig(): any {
'benthedog.near': '#6124d9',
},
meme_cap_tokens: [
'token.lonkingnearbackto2024.near',
'blackdragon.tkn.near',
'token.lonkingnearbackto2024.near',
'gear.enleap.near',
'touched.tkn.near',
'token.0xshitzu.near',
'kat.token0.near',
],
coming_offline_soon_token: [
'touched.tkn.near',
Expand Down Expand Up @@ -699,6 +699,7 @@ export function getMemeCheckInConfig(): any {
'token.lonkingnearbackto2024.near',
'blackdragon.tkn.near',
'gear.enleap.near',
'gp.token0.near',
],
nftMetaData: {
title: 'MEME Honorary NFT 6',
Expand Down
2 changes: 1 addition & 1 deletion src/components/meme/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function formatSeconds(seconds) {
const minutes = Math.floor((seconds % (60 * 60)) / 60);
let result = '';
if (days > 0) {
result += days + ' ' + 'days' + ' ';
result += days + ' ' + (days == 1 ? 'day' : 'days') + ' ';
}
if (hours > 0) {
result += hours + ' ' + 'hour' + ' ';
Expand Down

0 comments on commit 4b5ee0e

Please sign in to comment.