From 40d365c0dc1bd300309ac801068e5ce222fe5254 Mon Sep 17 00:00:00 2001 From: tree Date: Thu, 25 Jan 2024 18:49:03 +0100 Subject: [PATCH] update --- src/explorer.json | 3 ++- src/pages/index.astro | 6 +++++- utils/explorer.js | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/explorer.json b/src/explorer.json index d4957b4..2c66179 100644 --- a/src/explorer.json +++ b/src/explorer.json @@ -1,3 +1,4 @@ { - "projects": 429 + "projects": 429, + "contributors": 5 } \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index fb73060..d363f87 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -48,7 +48,7 @@ for (const ev of events) {
Research
-
3 reserch projects →
+
3 reserch projects →
@@ -59,6 +59,10 @@ for (const ev of events) {
{explorer.projects}
Projects
+
+
{explorer.contributors}
+
Contributors
+
diff --git a/utils/explorer.js b/utils/explorer.js index 88d5b37..48b105e 100644 --- a/utils/explorer.js +++ b/utils/explorer.js @@ -3,8 +3,12 @@ const resp = await fetch("https://explorer-data.web3privacy.info/"); const data = await resp.json(); +const respContribs = await fetch(`https://api.github.com/repos/web3privacy/explorer-data/contributors`) +const respContribsData = await respContribs.json(); + const explorer = { - projects: data.projects.length + projects: data.projects.length, + contributors: respContribsData.length, } await Deno.writeTextFile("./src/explorer.json", JSON.stringify(explorer, null, 2))