diff --git a/app/page.tsx b/app/page.tsx index b5c6335..f901bc0 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,6 +1,28 @@ -import { general_contributors, team2, teamSparkles } from '../list'; +'use client'; + +type Person = string; + +export default async function App() { + const { contributors } = await fetch( + 'https://raw.githubusercontent.com/v3xlabs/v3x-data/master/team/contributors.json' + ).then( + async (response) => + (await response.json()) as { contributors: Person[] } + ); + const { core } = await fetch( + 'https://raw.githubusercontent.com/v3xlabs/v3x-data/master/team/core.json' + ).then( + async (response) => + (await response.json()) as { + core: { + name: string; + title: string; + avatar: string; + url?: string; + }[]; + } + ); -export default function App() { return (
@@ -13,8 +35,13 @@ export default function App() {
Team ✨
- {teamSparkles.map((member, index) => ( - + {core.map((member, index) => ( +
{member.avatar && ( @@ -39,65 +66,28 @@ export default function App() { {member.title ?? 'Contributor'}
-
- ))} -
-
-
-
Team 🌱
-
- {team2.map((member, index) => ( -
-
- {member.avatar && ( - - )} - {!member.avatar && ( -
- 🤷‍♀️ -
- )} -
-
-
- {member.name ?? 'Unknown Contributor'} -
-
- {member.title ?? 'Contributor'} -
-
-
+
))}
Contributors 🤝
- {general_contributors.map((member, index) => ( + {contributors.map((member, index) => ( - {member.avatar && ( - {member.name} - )} - {!member.avatar && ( -
- 🤷‍♀️ -
- )} + {member}
))}
diff --git a/list.ts b/list.ts deleted file mode 100644 index a6e4ac6..0000000 --- a/list.ts +++ /dev/null @@ -1,148 +0,0 @@ -type Person = { - avatar?: `${string}.webp`; - name: string; - title?: string; - url?: `https://${string}` | `http://${string}`; - slug?: string; -}; - -export const teamSparkles: Person[] = [ - { - name: 'Luc van Kampen', - title: 'Lead Researcher', - avatar: '/team/luc.webp', - slug: 'luc', - }, - { - name: 'Jakob Helgesson', - title: 'Validation Overlord', - avatar: '/team/jakob.webp', - slug: 'jakob', - }, -]; - -export const team2: Person[] = [ - { - name: 'Prokop Schield', - title: 'Nodesite Engineer', - slug: 'prokop', - }, - { - name: 'Dercio Hoffman', - title: 'Researcher', - avatar: '/team/dercio.webp', - slug: 'dercio', - }, - { - name: 'Jonatan Holmgren', - title: 'Researcher', - avatar: '/team/jonte.webp', - slug: 'jonte', - }, - { - name: 'Ana Howard', - title: 'Researcher', - avatar: '/team/ana.webp', - slug: 'ana', - }, - { - name: 'Elliot Lindberg', - title: 'Boeing-777 Pilot', - slug: 'elliot', - }, - { - name: 'Antonio Fran Trstenjak', - title: 'Esoteric Code Magician', - avatar: '/team/antony.webp', - slug: 'antony', - }, - { - name: 'Harry Bairstow', - title: 'Distributed Systems Engineer', - avatar: '/team/harry.webp', - slug: 'harry', - }, -]; - -export const general_contributors: Person[] = [ - { - name: 'Laith', - avatar: '/contributor/laith.webp', - url: 'https://laith.app/', - }, - { - name: 'Miguel Piedrafita', - avatar: '/contributor/miguel.webp', - url: 'https://miguel.build/', - }, - { - name: 'Hattorius', - avatar: '/contributor/hatty.webp', - url: 'https://xlogic.sh/', - }, - { - name: 'Joshua Hendrix', - avatar: '/contributor/josh.webp', - url: 'https://github.com/thejoshuahendrix', - }, - { - name: 'Derock', - avatar: '/contributor/derock.webp', - url: 'https://derock.dev/', - }, - { - name: 'Visen', - avatar: '/contributor/visen.webp', - url: 'https://visen.dev/', - }, - { - name: 'Alan', - avatar: '/contributor/vlan.webp', - url: 'https://github.com/imvlan', - }, - { - name: 'Samvel Petrosyan', - avatar: '/contributor/loidnoir.webp', - url: 'https://github.com/loidnoir', - }, - { - name: 'Jonah "Jay" Y-M', - avatar: '/contributor/tgtechie.webp', - url: 'https://github.com/TG-Techie', - }, - { - name: 'Michael Desormeaux', - avatar: '/contributor/michaeldesormeaux.webp', - url: 'https://home.mikedez.com/', - }, - { - name: 'Carlos A', - avatar: '/contributor/chalkedgoodse.webp', - url: 'https://www.carlosalba.dev/', - }, - { - name: 'Will (0xEquinox)', - avatar: '/contributor/equinox.webp', - url: 'https://github.com/0xEquinox', - }, - { - name: 'Kristóf Kékesi', - avatar: '/contributor/kristof.webp', - url: 'https://kekesi.dev', - }, - { - name: 'MilkedCow', - avatar: '/contributor/milkedcow.webp', - url: 'https://github.com/MilkedCow', - }, - { - name: 'JoelImgu', - avatar: '/contributor/joelimgu.webp', - url: 'https://joelimgu.github.io', - }, - { - name: 'Oğuz Eray Orhan', - avatar: '/contributor/oguzeray.webp', - url: 'https://github.com/oguzeray', - }, -];