diff --git a/src/api/index.ts b/src/api/index.ts index e96ed85b..c6abca28 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -807,10 +807,13 @@ interface NovaProjectTotalPointsResponse { data: NovaProjectTotalPoints[]; } -export const getNovaProjectTotalPoints = - (): Promise => { - return http.get(`${BASE_URL_LRT_POINTS}/nova/project/points`); - }; +export const getNovaProjectTotalPoints = (params: { + season: number; +}): Promise => { + return http.get(`${BASE_URL_LRT_POINTS}/nova/project/points`, { + params, + }); +}; export interface CategoryZKLItem { name: string; diff --git a/src/components/DashboardS2/Tabs/EcoDApps.tsx b/src/components/DashboardS2/Tabs/EcoDApps.tsx index 9e304c66..23998d3c 100644 --- a/src/components/DashboardS2/Tabs/EcoDApps.tsx +++ b/src/components/DashboardS2/Tabs/EcoDApps.tsx @@ -585,12 +585,14 @@ export default function EcoDApps({ tvlCategoryMilestone, holdingPoints, novaCategoryTotalPoints, + season, }: { tabActive?: { category: string; name: string; iconURL: string; }; + season: number; novaCategoryUserPoints: NovaCategoryUserPoints[]; tvlCategoryMilestone: TvlCategoryMilestone[]; holdingPoints?: NovaPointsListItem; @@ -612,7 +614,8 @@ export default function EcoDApps({ >([]); const getProjectTotalPoints = async () => { - const { data } = await getNovaProjectTotalPoints(); + console.log("season", season); + const { data } = await getNovaProjectTotalPoints({ season }); if (data) { setProjectTotalPoints(data); } @@ -620,7 +623,7 @@ export default function EcoDApps({ useEffect(() => { getProjectTotalPoints(); - }, []); + }, [season]); const getTotalPointsByProject = useCallback( (project: string) => { @@ -1206,7 +1209,7 @@ export default function EcoDApps({ ], }, { - category: "gamefi", + category: "other", iconURL: "/img/icon-skyrangers.png", name: "Sky Rangers", link: "https://statics.skyrangers.io/", diff --git a/src/components/DashboardS2/Tabs/SectorHeader.tsx b/src/components/DashboardS2/Tabs/SectorHeader.tsx index e14a4cdd..bd79a964 100644 --- a/src/components/DashboardS2/Tabs/SectorHeader.tsx +++ b/src/components/DashboardS2/Tabs/SectorHeader.tsx @@ -49,19 +49,19 @@ export default function SectorHeader({ holding: [ { tvl: 0, - zkl: 500000, + zkl: 100000, }, { tvl: 200000000, - zkl: 1000000, + zkl: 200000, }, { tvl: 500000000, - zkl: 2000000, + zkl: 500000, }, { tvl: 1000000000, - zkl: 3000000, + zkl: 1000000, }, ], spotdex: [ @@ -71,15 +71,15 @@ export default function SectorHeader({ }, { tvl: 5000000, - zkl: 500000, + zkl: 200000, }, { tvl: 25000000, - zkl: 1000000, + zkl: 500000, }, { tvl: 50000000, - zkl: 1500000, + zkl: 1000000, }, ], perpdex: [ @@ -89,15 +89,15 @@ export default function SectorHeader({ }, { tvl: 100000000, - zkl: 500000, + zkl: 200000, }, { tvl: 500000000, - zkl: 1000000, + zkl: 500000, }, { tvl: 2000000000, - zkl: 2000000, + zkl: 1000000, }, ], lending: [ @@ -107,15 +107,15 @@ export default function SectorHeader({ }, { tvl: 10000000, - zkl: 350000, + zkl: 200000, }, { tvl: 50000000, - zkl: 700000, + zkl: 500000, }, { tvl: 200000000, - zkl: 1500000, + zkl: 1000000, }, ], }; @@ -128,7 +128,7 @@ export default function SectorHeader({ } = { gamefi: { zkl: 10000, - max: 1000000, + max: 500000, }, other: { zkl: 50000, @@ -136,7 +136,7 @@ export default function SectorHeader({ }, nativeboost: { zkl: 50000, - max: 500000, + max: 5000000, }, }; diff --git a/src/constants/epoch.ts b/src/constants/epoch.ts index 46ca22e5..0d23e108 100644 --- a/src/constants/epoch.ts +++ b/src/constants/epoch.ts @@ -5,4 +5,5 @@ export const epochList = [ season: 2, }, { name: "Epoch Two", season: 3 }, + { name: "Epoch Three", season: 4 }, ]; diff --git a/src/pages/DashboardS2/index2.tsx b/src/pages/DashboardS2/index2.tsx index 5448d748..4c3cc83c 100644 --- a/src/pages/DashboardS2/index2.tsx +++ b/src/pages/DashboardS2/index2.tsx @@ -306,11 +306,11 @@ export default function Dashboard() { name: "Lending", category: "lending", }, - { - iconURL: "/img/icon-sector-6.svg", - name: "GameFi", - category: "gamefi", - }, + // { + // iconURL: "/img/icon-sector-6.svg", + // name: "GameFi", + // category: "gamefi", + // }, { iconURL: "/img/icon-sector-7.svg", name: "Others", @@ -425,7 +425,7 @@ export default function Dashboard() { console.log("getTvlCategory", res); setTvlCategoryMilestone(res?.data || []); }; - const [epochActive, setEpochActive] = useState(1); + const [epochActive, setEpochActive] = useState(2); const season = useMemo(() => { if (tabs2Active === 99) { @@ -457,36 +457,68 @@ export default function Dashboard() { }; const novaPointsList = useMemo(() => { - const categorys = [ - { - name: "Assets Points", - category: "holding", - }, - { - name: "Native Boost Points", - category: "nativeboost", - }, - { - name: "Spot DEX Points", - category: "spotdex", - }, - { - name: "Perp DEX Points", - category: "perpdex", - }, - { - name: "Lending Points", - category: "lending", - }, - { - name: "GameFi Points", - category: "gamefi", - }, - { - name: "Others Points", - category: "other", - }, - ]; + const categorys = + epochActive === 2 + ? [ + { + name: "Assets Points", + category: "holding", + }, + { + name: "Native Boost Points", + category: "nativeboost", + }, + { + name: "Spot DEX Points", + category: "spotdex", + }, + { + name: "Perp DEX Points", + category: "perpdex", + }, + { + name: "Lending Points", + category: "lending", + }, + // { + // name: "GameFi Points", + // category: "gamefi", + // }, + { + name: "Others Points", + category: "other", + }, + ] + : [ + { + name: "Assets Points", + category: "holding", + }, + { + name: "Native Boost Points", + category: "nativeboost", + }, + { + name: "Spot DEX Points", + category: "spotdex", + }, + { + name: "Perp DEX Points", + category: "perpdex", + }, + { + name: "Lending Points", + category: "lending", + }, + { + name: "GameFi Points", + category: "gamefi", + }, + { + name: "Others Points", + category: "other", + }, + ]; const arr = categorys.map((c) => { const userCategoryData = novaCategoryUserPointsTotal.find( @@ -633,9 +665,12 @@ export default function Dashboard() {
Epoch One (From May 30th to July 15th)
-
+
Epoch Two (From July 16th to Aug 31st)
+
+ Epoch Three (From Step 1) +
@@ -765,6 +800,7 @@ export default function Dashboard() { )} {tabs2Active !== 0 && tabs2Active !== 99 && ( store.airdrop); const [tabActive, setTabActive] = useState(0); - const [epochActive, setEpochActive] = useState(1); + const [epochActive, setEpochActive] = useState(2); const [selfData, setSelfData] = useState(null); const [categoryList, setCategoryList] = useState([]); + const tabs = useMemo(() => { + return epochActive === 2 + ? [ + { + name: "Holding", + category: "holding", + iconURL: "/img/icon-sector-1.svg", + }, + { + name: "Boosted", + category: "nativeboost", + iconURL: "/img/icon-sector-2.svg", + }, + { + name: "Spot DEX", + category: "spotdex", + iconURL: "/img/icon-sector-3.svg", + }, + { + name: "Perp DEX", + category: "perpdex", + iconURL: "/img/icon-sector-4.svg", + }, + { + name: "Lending", + category: "lending", + iconURL: "/img/icon-sector-5.svg", + }, + // { name: "GameFi", category: "gamefi" }, + { + name: "Other", + category: "other", + iconURL: "/img/icon-sector-7.svg", + }, + ] + : [ + { + name: "Holding", + category: "holding", + iconURL: "/img/icon-sector-1.svg", + }, + { + name: "Boosted", + category: "nativeboost", + iconURL: "/img/icon-sector-2.svg", + }, + { + name: "Spot DEX", + category: "spotdex", + iconURL: "/img/icon-sector-3.svg", + }, + { + name: "Perp DEX", + category: "perpdex", + iconURL: "/img/icon-sector-4.svg", + }, + { + name: "Lending", + category: "lending", + iconURL: "/img/icon-sector-5.svg", + }, + { name: "GameFi", category: "gamefi" }, + { + name: "Other", + category: "other", + iconURL: "/img/icon-sector-7.svg", + }, + ]; + }, [epochActive]); + const getCategoryListFunc = async (category: string) => { try { const { data } = await getCategoryList(category, { diff --git a/vite.config.ts b/vite.config.ts index 9bc30499..80419bc0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -47,8 +47,8 @@ export default defineConfig({ port: 3001, proxy: { "/app-api": { - target: "https://goerli.app.zklink.io", - // target: "https://app-api.zklink.io", + // target: "https://goerli.app.zklink.io", + target: "https://app-api.zklink.io", changeOrigin: true, rewrite: (path) => path.replace(/^\/app-api/, ""), },