Skip to content

Commit

Permalink
Merge pull request #92 from Giveth/develop
Browse files Browse the repository at this point in the history
Gitcoin project url
  • Loading branch information
aminlatifi authored Jun 17, 2024
2 parents e3ce688 + 961826e commit 11d851e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
14 changes: 2 additions & 12 deletions src/features/import-projects/gitcoin/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,8 @@ import { IPFS_GATEWAY, gitcoinSourceConfig } from "./constants";
import Showdown from "showdown";

const generateGitcoinUrl = (project: GitcoinProjectInfo) => {
const application = project.applications[0];

if (
!application ||
!application?.roundId ||
!application?.chainId ||
!application?.id
)
return "";

const { chainId, roundId, id } = application;
return `#/round/${chainId}/${roundId}/${id}`;
if (!project.id) return "";
return `#/projects/${project.id}`;
};

const convertIpfsHashToHttps = (hash: string) => {
Expand Down
6 changes: 0 additions & 6 deletions src/features/import-projects/gitcoin/service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { graphQLRequest } from "../../../helpers/request";
import { GITCOIN_API_URL } from "./constants";
import { GitcoinProjectInfo } from "./type";

export const fetchGitcoinProjectsBatch = async (
first: number,
Expand All @@ -24,11 +23,6 @@ export const fetchGitcoinProjectsBatch = async (
) {
id
name
applications {
roundId
chainId
id
}
metadata
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/features/import-projects/gitcoin/type.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
export type GitcoinProjectInfo = {
id: string;
name: string;
applications: GitcoinApplication[];
metadata: GitcoinMetadata;
};

type GitcoinApplication = {
roundId: string;
chainId: number;
id: string;
};

type GitcoinMetadata = {
type: string;
title: string;
Expand Down

0 comments on commit 11d851e

Please sign in to comment.