diff --git a/src/components/ProjectsTable/ProjectsTableHeadRow.tsx b/src/components/ProjectsTable/ProjectsTableHeadRow.tsx index 0e04ce5..31f71ae 100644 --- a/src/components/ProjectsTable/ProjectsTableHeadRow.tsx +++ b/src/components/ProjectsTable/ProjectsTableHeadRow.tsx @@ -40,6 +40,7 @@ export function ProjectsTableHeadRow() { */} handleSort("name")}>
+ Project Name
diff --git a/src/components/ProjectsTable/ProjectsTableRow.tsx b/src/components/ProjectsTable/ProjectsTableRow.tsx index 3da78b8..e3c7db8 100644 --- a/src/components/ProjectsTable/ProjectsTableRow.tsx +++ b/src/components/ProjectsTable/ProjectsTableRow.tsx @@ -23,6 +23,7 @@ export function ProjectsTableRow({ project }: ProjectsTableRowProps) { */} +
=> { limit: 10, skip: 0, }); + const res = await fetch( `${EZRF_API_URL}projects.listApproved?input=${encodedInput}`, { headers: { "content-type": "application/json", - "round-id": ROUND_ID, + "round-id": ROUND.id, + "x-api-key":ROUND.key }, } ); @@ -39,6 +41,7 @@ export const fetchApplications = async (): Promise => { export const fetchMetrics = async (): Promise => { const projects = await fetchApplications(); const projectIds = projects.map(({ id }) => id); + console.log(JSON.stringify(projectIds)); const encodedInput = encodeInput({ projectIds }); const res = await fetch( @@ -46,7 +49,8 @@ export const fetchMetrics = async (): Promise => { { headers: { "content-type": "application/json", - "round-id": ROUND_ID, + "round-id": ROUND.id, + "x-api-key":ROUND.key }, } ); diff --git a/src/services/ezrfApi/config.ts b/src/services/ezrfApi/config.ts index 75335b6..197ddc6 100644 --- a/src/services/ezrfApi/config.ts +++ b/src/services/ezrfApi/config.ts @@ -1,2 +1,21 @@ export const EZRF_API_URL = "https://ezrf-impact.vercel.app/api/trpc/"; -export const ROUND_ID = "the-sunnys" +// export const ROUND_ID = "the-sunnys" +// export const API_KEY = "08670c35100892eb840d37c36ed009999b3eb98befcbc42f5fc462b3b8b7b472" + + +type Round = { + id: string; + key: string; +}; + + const testRound: Round = { + id: "round-huss-3", + key: "b16ad95e191a16ecfb9a9ef6f9c3599fec7718ffd237d3fecef52a9390b1dd65", +}; + +// const sunnyRound: Round = { +// id: "the-sunnys", +// key: "bc2edd7987e6cba369add25aa7312875e06a8aa1c2dfe4b37fc05ab58db698e0", +// }; + +export const ROUND = testRound;