Skip to content

Commit

Permalink
Dynamic JSON Fetching for Contributer Data
Browse files Browse the repository at this point in the history
  • Loading branch information
fullmeteor172 committed Oct 25, 2023
1 parent cb4d8c8 commit 4f76921
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions website/src/components/ProfilesSection.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
<script>
import ProfileCard from "./ProfileCard.svelte";
import Contributers from "../../../.data/complete-data.json";
const apiURL = "https://raw.githubusercontent.com/osc-vitap/OpenSource101/main/.data/complete-data.json";
let ContributersObject = [];
let Contributers = [];
fetch(apiURL)
.then((response) => response.json())
.then((data) => {
ContributersObject = data;
Contributers = Object.values(ContributersObject);
})
.catch((error) => {
console.error("Error:", error);
});
</script>

<section>
Expand Down

0 comments on commit 4f76921

Please sign in to comment.