Skip to content

Commit

Permalink
Remove nft projects (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 authored Dec 4, 2023
1 parent a53ea23 commit 0c4594b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
23 changes: 17 additions & 6 deletions src/components/Projects.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { projects as getProjects } from "../config/projects";
import { useTranslation } from "react-i18next";
import { PortalTag } from "../types";
import { useEffect, useRef, useState } from "react";
import { useEffect, useMemo, useRef, useState } from "react";
import { PortalItem } from "./PortalItem";

type FilterTag = PortalTag | "All";
Expand All @@ -27,6 +27,11 @@ export const Projects = () => {

const portalsRef = useRef<HTMLDivElement>(null);

const projects = useMemo(
() => getProjects(t).filter(({ tags }) => selectedTag === "All" || tags.includes(selectedTag)),
[selectedTag, t]
);

useEffect(() => {
const listener = (e: MouseEvent) => {
if (e.target && portalsRef.current && !portalsRef.current.contains(e.target as Node)) {
Expand Down Expand Up @@ -59,14 +64,20 @@ export const Projects = () => {
</div>

<div
className="mt-[0.625rem] grid grid-cols-1 gap-[0.625rem] lg:mt-[1.875rem] lg:grid-cols-4 lg:gap-5"
className={`${
projects.length
? "mt-[0.625rem] grid grid-cols-1 gap-[0.625rem] lg:mt-[1.875rem] lg:grid-cols-4 lg:gap-5"
: "mt-10 flex justify-center"
}`}
ref={portalsRef}
>
{getProjects(t)
.filter(({ tags }) => selectedTag === "All" || tags.includes(selectedTag))
.map((meta) => (
{projects.length ? (
projects.map((meta) => (
<PortalItem key={meta.name} meta={meta} flipped={flippedPortal} onClick={setFlippedPortal} />
))}
))
) : (
<span className="text-bold text-sm text-white/50">No data</span>
)}
</div>
</div>
</div>
Expand Down
36 changes: 18 additions & 18 deletions src/config/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import phala from "../assets/projects/phala.png";
import bifrost from "../assets/projects/bifrost.png";
import parallel from "../assets/projects/parallel.png";
import novawallet from "../assets/projects/novawallet.png";
import raregems from "../assets/projects/raregems.png";
import ringoNft from "../assets/projects/ringo-nft.png";
// import raregems from "../assets/projects/raregems.png";
// import ringoNft from "../assets/projects/ringo-nft.png";
import accountMigrationDapp from "../assets/projects/account-migration-dapp.png";
import stakingDapp from "../assets/projects/staking-dapp.png";
import feeMarketDapp from "../assets/projects/fee-market-dapp.png";
Expand Down Expand Up @@ -266,22 +266,22 @@ export const projects = (t: TFunction): PortalMeta[] => [
),
tags: ["Wallet"],
},
{
logo: raregems,
name: t("RareGems"),
link: t("https://raregems.io/"),
description: t(
"RareGems is a non-custodial multichain NFT marketplace, which has supported Crab, Energy Web, Velas, Celo, Moonbeam, Moonriver, Oasis Emerald, Astar Network, and Avalanche."
),
tags: ["NFT"],
},
{
logo: ringoNft,
name: t("RINGO NFT"),
link: t("https://ringonft.art/"),
description: t("NFT Avatar Collection on Crab."),
tags: ["NFT"],
},
// {
// logo: raregems,
// name: t("RareGems"),
// link: t("https://raregems.io/"),
// description: t(
// "RareGems is a non-custodial multichain NFT marketplace, which has supported Crab, Energy Web, Velas, Celo, Moonbeam, Moonriver, Oasis Emerald, Astar Network, and Avalanche."
// ),
// tags: ["NFT"],
// },
// {
// logo: ringoNft,
// name: t("RINGO NFT"),
// link: t("https://ringonft.art/"),
// description: t("NFT Avatar Collection on Crab."),
// tags: ["NFT"],
// },
{
logo: accountMigrationDapp,
name: t("Account Migration Dapp"),
Expand Down

0 comments on commit 0c4594b

Please sign in to comment.