Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the description of some projects #387

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## How to add your portal

1. Fork this repo
2. Add your portal info to the `portals` array in [src/config/portals.ts](./src/config/portals.ts) (Please select up to `3` tags)
2. Add your portal info to the `projects` array in [src/config/projects.ts](./src/config/projects.ts) (Please select up to `3` tags)
3. Translations can be edited in files in the [public/locales](./public//locales/) directory
4. Please put the logo file in the [src/assets/portals](./src//assets/portals/) folder
4. Please put the logo file in the [src/assets/projects](./src//assets/projects/) folder
5. Then submit a pr to the `master` branch of our repo, we will review it as soon as possible
6 changes: 3 additions & 3 deletions src/components/Portals.tsx → src/components/Projects.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { portals as getPortals } from "../config/portals";
import { projects as getProjects } from "../config/projects";
import { useTranslation } from "react-i18next";
import { PortalTag } from "../types";
import { useEffect, useRef, useState } from "react";
Expand All @@ -20,7 +20,7 @@ const ALL_TAGS: FilterTag[] = [
"Tool",
];

export const Portals = () => {
export const Projects = () => {
const { t } = useTranslation();
const [selectedTag, setSelectedTag] = useState<FilterTag>("All");
const [flippedPortal, setFlippedPortal] = useState(""); // portal name
Expand Down Expand Up @@ -62,7 +62,7 @@ export const Portals = () => {
className="mt-[0.625rem] grid grid-cols-1 gap-[0.625rem] lg:mt-[1.875rem] lg:grid-cols-4 lg:gap-5"
ref={portalsRef}
>
{getPortals(t)
{getProjects(t)
.filter(({ tags }) => selectedTag === "All" || tags.includes(selectedTag))
.map((meta) => (
<PortalItem key={meta.name} meta={meta} flipped={flippedPortal} onClick={setFlippedPortal} />
Expand Down
14 changes: 7 additions & 7 deletions src/config/portals.ts → src/config/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import brownie from "../assets/portals/brownie.png";
import scaffoldEth from "../assets/portals/scaffold-eth.png";
import walletconnect from "../assets/portals/walletconnect.png";

export const portals = (t: TFunction): PortalMeta[] => [
export const projects = (t: TFunction): PortalMeta[] => [
{
logo: metamask,
name: t("MetaMask"),
Expand Down Expand Up @@ -266,36 +266,36 @@ export const portals = (t: TFunction): PortalMeta[] => [
name: t("RareGems"),
link: t("https://raregems.io/"),
description: t(
"RareGems is a non-custodial multichain NFT marketplace, which has supported Crab2, Energy Web, Velas, Celo, Moonbeam, Moonriver, Oasis Emerald, Astar Network, and Avalanche. "
"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 Crab2."),
description: t("NFT Avatar Collection on Crab."),
tags: ["NFT"],
},
{
logo: accountMigrationDapp,
name: t("Account Migration Dapp"),
link: t("https://migration.darwinia.network/"),
description: t("A tool to migrate your Darwinia1 account to Darwinia2."),
description: t("A tool to migrate your Darwinia 1.0 account to Darwinia."),
tags: ["Tool"],
},
{
logo: stakingDapp,
name: t("Staking Dapp"),
link: t("https://staking.darwinia.network/"),
description: t("The easiest way to stake on Darwinia2."),
description: t("The easiest way to stake on Darwinia."),
tags: ["Tool"],
},
{
logo: feeMarketDapp,
name: t("Fee Market Dapp"),
link: t("https://feemarket.darwinia.network/"),
description: t("To Provide data statistics and relayer operation functions for Darwinia2."),
description: t("To Provide data statistics and relayer operation functions for Darwinia."),
tags: ["Tool"],
},
{
Expand All @@ -310,7 +310,7 @@ export const portals = (t: TFunction): PortalMeta[] => [
name: t("Local Subkey Migration"),
link: t("/local_subkey_migration"),
description: t(
"Here are the Darwinia1 accounts you generated on the Darwinia Apps of the old version. You can restore them in the polkadot.js by importing the JSON files."
"Here are the Darwinia 1.0 accounts you generated on the Darwinia Apps of the old version. You can restore them in the polkadot.js by importing the JSON files."
),
tags: ["Tool"],
},
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Disclaimer } from "../components/Disclaimer";
import { Hero } from "../components/Hero";
import { Portals } from "../components/Portals";
import { Projects } from "../components/Projects";

export default function Home() {
return (
<>
<Hero />
<Portals />
<Projects />
<Disclaimer />
</>
);
Expand Down
Loading