Skip to content

Commit

Permalink
Merge pull request #370 from zkLinkProtocol/fix/update-gamefi
Browse files Browse the repository at this point in the history
rm gamefi points
  • Loading branch information
MickWang authored Dec 4, 2024
2 parents e05b5d7 + 418f02d commit 8884d71
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 133 deletions.
88 changes: 26 additions & 62 deletions src/pages/DashboardS2/index2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -463,68 +463,32 @@ export default function Dashboard() {
};

const novaPointsList = useMemo(() => {
const categorys =
epochActive === epochList.length - 1
? [
{
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 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: "Others Points",
category: "other",
},
];

const arr = categorys.map((c) => {
const userCategoryData = novaCategoryUserPointsTotal.find(
Expand Down
103 changes: 32 additions & 71 deletions src/pages/Leaderboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -474,77 +474,38 @@ export default function Leaderboard() {
const [categoryList, setCategoryList] = useState<ListItem[]>([]);

const tabs = useMemo(() => {
return epochActive === 2
? [
{
name: "Holding",
category: "holding",
iconURL: "/img/icon-sector-assets.svg",
},
{
name: "Boosted",
category: "nativeboost",
iconURL: "/img/icon-sector-boosted.svg",
},
{
name: "Spot DEX",
category: "spotdex",
iconURL: "/img/icon-sector-spotdex.svg",
},
{
name: "Perp DEX",
category: "perpdex",
iconURL: "/img/icon-sector-perpdex.svg",
},
{
name: "Lending",
category: "lending",
iconURL: "/img/icon-sector-lending.svg",
},
// { name: "GameFi", category: "gamefi" },
{
name: "Other",
category: "other",
iconURL: "/img/icon-sector-other.svg",
},
]
: [
{
name: "Holding",
category: "holding",
iconURL: "/img/icon-sector-assets.svg",
},
{
name: "Boosted",
category: "nativeboost",
iconURL: "/img/icon-sector-boosted.svg",
},
{
name: "Spot DEX",
category: "spotdex",
iconURL: "/img/icon-sector-spotdex.svg",
},
{
name: "Perp DEX",
category: "perpdex",
iconURL: "/img/icon-sector-perpdex.svg",
},
{
name: "Lending",
category: "lending",
iconURL: "/img/icon-sector-lending.svg",
},
{
name: "GameFi",
category: "gamefi",
iconURL: "/img/icon-sector-gamefi.svg",
},
{
name: "Other",
category: "other",
iconURL: "/img/icon-sector-other.svg",
},
];
return [
{
name: "Holding",
category: "holding",
iconURL: "/img/icon-sector-assets.svg",
},
{
name: "Boosted",
category: "nativeboost",
iconURL: "/img/icon-sector-boosted.svg",
},
{
name: "Spot DEX",
category: "spotdex",
iconURL: "/img/icon-sector-spotdex.svg",
},
{
name: "Perp DEX",
category: "perpdex",
iconURL: "/img/icon-sector-perpdex.svg",
},
{
name: "Lending",
category: "lending",
iconURL: "/img/icon-sector-lending.svg",
},
{
name: "Other",
category: "other",
iconURL: "/img/icon-sector-other.svg",
},
];
}, [epochActive]);

const getCategoryListFunc = async (category: string) => {
Expand Down

0 comments on commit 8884d71

Please sign in to comment.