refactor: dynamically create credit repos

This commit is contained in:
afn
2022-10-20 00:29:16 -04:00
parent 6f6081eb1b
commit 9010842f73
4 changed files with 35 additions and 26 deletions

View File

@@ -1,13 +1,24 @@
<script lang="ts">
import ContributorHost from '$lib/components/molecules/ContributorHost.svelte';
import ContributorsStore from '../../lib/stores/ContributorsStore.js';
import { onMount } from "svelte";
let data;
onMount (() => {
ContributorsStore.subscribe(async (e) => {
data = await e;
console.log(data);
});
});
</script>
<div class="wrapper contrib-grid">
<ContributorHost repo="cli"/>
<ContributorHost repo="patcher"/>
<ContributorHost repo="patches"/>
<ContributorHost repo="integrations"/>
<ContributorHost repo="manager"/>
{#if data}
{#each data.repositories as { contributors, name }}
<ContributorHost contribs={contributors} repo={name}/>
{/each}
{/if}
</div>
<style>