diff --git a/app/const.tsx b/app/const.tsx index a768c1a..eb53889 100644 --- a/app/const.tsx +++ b/app/const.tsx @@ -92,37 +92,6 @@ import IconGamesImg from "../public/img/icons/Games.svg"; import IconMagicImg from "../public/img/icons/Magic.svg"; import IconCommunityImg from "../public/img/icons/Community.svg"; -// Team -import AndyImg from "../public/img/pfps/Andy.png"; -import AnimenImg from "../public/img/pfps/Animen.png"; -import AntlionImg from "../public/img/pfps/Antlion.png"; -import BasImg from "../public/img/pfps/Bas.png"; -import CrisisImg from "../public/img/pfps/Crisis.png"; -import DeathMonkeyImg from "../public/img/pfps/DeathMonkey.png"; -import Ent1T7Img from "../public/img/pfps/ENT1T7.png"; -import FrannyImg from "../public/img/pfps/Franny.png"; -import GinaImg from "../public/img/pfps/Gina.png"; -import JohnImg from "../public/img/pfps/John.png"; -import JonImg from "../public/img/pfps/Jon.png"; -import JoshImg from "../public/img/pfps/Josh.png"; -import JpegapeImg from "../public/img/pfps/Jpegape.png"; -import JustCheeseImg from "../public/img/pfps/JustCheese.png"; -import KarelImg from "../public/img/pfps/Karel.png"; -import MulfImg from "../public/img/pfps/Mulf.png"; -import NoisewarImg from "../public/img/pfps/Noisewar.png"; -import PeitaImg from "../public/img/pfps/Peita.png"; -import PeterImg from "../public/img/pfps/Peter.webp"; -import PreeminentImg from "../public/img/pfps/Preeminent.png"; -import RappzulaImg from "../public/img/pfps/Rappzula.png"; -import SambinoImg from "../public/img/pfps/Sambino.png"; -import SargonImg from "../public/img/pfps/Sargon.png"; -import VinnyImg from "../public/img/pfps/Vinny.png"; -import XImg from "../public/img/pfps/X_.webp"; -import ZakImg from "../public/img/pfps/Zak.png"; -import WagingBullImg from "../public/img/pfps/Wagingbull.png"; -import YenImg from "../public/img/pfps/Yen.png"; -import YuriImg from "../public/img/pfps/Yuri.png"; - // Twitter import OfficialAbengerImg from "../public/img/twitter/OfficialAbenger.webp"; import SquareJordanImg from "../public/img/twitter/SquareJordan.webp"; @@ -165,231 +134,6 @@ import { UsersIcon, } from "~/components/Icons"; -export const teamMembers = [ - { - name: "Karel Vuong", - title: "Co-Founder", - discordLink: "https://discordapp.com/users/397537602988670977", - twitterLink: "https://twitter.com/karelvuong", - image: KarelImg, - team: "Core", - }, - { - name: "John Patten", - title: "Co-Founder", - discordLink: "https://discordapp.com/users/882718244920754238", - twitterLink: "https://twitter.com/jpatten__", - image: JohnImg, - team: "Core", - }, - { - name: "Yuri Visser", - title: "CTO", - discordLink: "https://discordapp.com/users/554674918562988072", - twitterLink: "https://twitter.com/aphexyuri", - image: YuriImg, - team: "Core", - }, - { - name: "Sam Udeschini", - title: "Head of Marketing", - discordLink: "https://discordapp.com/users/864206375492124702", - twitterLink: "https://twitter.com/sambino_eth", - image: SambinoImg, - team: "Core", - }, - { - name: "Gina Snoke", - title: "Head of Art", - discordLink: "https://discordapp.com/users/864206375492124702", - twitterLink: "https://twitter.com/GinaBlaster", - image: GinaImg, - team: "Creative", - }, - { - name: "Peter DiCicco", - title: "Narrative Director", - twitterLink: "https://twitter.com/PeterDiCicco", - image: PeterImg, - team: "Creative", - }, - { - name: "Peita", - title: "Economist", - discordLink: "https://discordapp.com/users/1031951650392387695", - twitterLink: "https://twitter.com/pugmassacre", - image: PeitaImg, - team: "Ecosystem", - }, - { - name: "Jpegape", - title: "Partnerships Lead", - discordLink: "https://discordapp.com/users/757087781515165706", - twitterLink: "https://twitter.com/Jpegape1", - image: JpegapeImg, - team: "Ecosystem", - }, - { - name: "Zak Keen", - title: "Senior Brand Designer", - discordLink: "https://discordapp.com/users/212333834501357578", - twitterLink: "https://twitter.com/Z_Keen", - image: ZakImg, - team: "Creative", - }, - { - name: "Josh", - title: "Live Ops Coordinator", - discordLink: "https://discordapp.com/users/851329871137472557", - twitterLink: "https://twitter.com/ReadyPlayerJay", - image: JoshImg, - team: "Marketing", - }, - { - name: "X", - title: "Community Manager", - discordLink: "https://discordapp.com/users/390264760748474368", - twitterLink: "https://twitter.com/cxf_0886", - image: XImg, - team: "Marketing", - }, - { - name: "DeathMonkey", - title: "Social Content Creator", - discordLink: "https://discordapp.com/users/221421997488340993", - twitterLink: "https://twitter.com/deathorcrypto", - image: DeathMonkeyImg, - team: "Marketing", - }, - { - name: "andy", - title: "Principal Artist", - image: AndyImg, - team: "Creative", - }, - { - name: "Yen", - title: "Artist", - twitterLink: "https://twitter.com/YenLeeArt", - image: YenImg, - team: "Creative", - }, - { - name: "Sargon", - title: "Director of Infrastructure", - image: SargonImg, - team: "Product & Engineering", - }, - { - name: "noisewar", - title: "Executive Producer", - discordLink: "https://discordapp.com/users/344520580290052096", - twitterLink: "https://twitter.com/warandnoise", - image: NoisewarImg, - team: "Product & Engineering", - }, - { - name: "jon", - title: "Product Manager", - image: JonImg, - team: "Product & Engineering", - }, - { - name: "Antlion", - title: "Backend Engineer", - discordLink: "https://discordapp.com/users/397537602988670977", - twitterLink: "https://twitter.com/0xAntlion", - image: AntlionImg, - team: "Product & Engineering", - }, - { - name: "rappzula", - title: "Full-Stack Engineer", - discordLink: "https://discordapp.com/users/690989750127165581", - twitterLink: "https://twitter.com/0xrappzula", - image: RappzulaImg, - team: "Product & Engineering", - }, - { - name: "Mulf", - title: "Full-Stack Engineer", - discordLink: "https://discordapp.com/users/696481332158660698", - twitterLink: "https://twitter.com/0xMulf ", - image: MulfImg, - team: "Product & Engineering", - }, - { - name: "frannyverse", - title: "Front-End Engineer", - discordLink: "https://discordapp.com/users/766502243699523615", - twitterLink: "https://twitter.com/fr4nnyverse", - image: FrannyImg, - team: "Product & Engineering", - }, - { - name: "wagingbull", - title: "Front-End Engineer", - discordLink: "https://discordapp.com/users/601936617820782592", - twitterLink: "https://twitter.com/waging_bull", - image: WagingBullImg, - team: "Product & Engineering", - }, - { - name: "crisis", - title: "Full-Stack Engineer", - discordLink: "https://discordapp.com/users/351558969568788482", - twitterLink: "https://twitter.com/crisidot", - image: CrisisImg, - team: "Product & Engineering", - }, - { - name: "Vinny", - title: "Solidity Developer", - discordLink: "https://discordapp.com/users/938500876438487061", - twitterLink: "https://twitter.com/VinnyDev1", - image: VinnyImg, - team: "Product & Engineering", - }, - { - name: "jcheese", - title: "Front-End Engineer", - discordLink: "https://discordapp.com/users/353057125137645568", - twitterLink: "https://twitter.com/jc_1917", - image: JustCheeseImg, - team: "Product & Engineering", - }, - { - name: "Bas", - title: "Product Designer", - image: BasImg, - team: "Creative", - twitterLink: "https://twitter.com/bas_vdg", - }, - { - name: "ENT", - title: "Product Designer", - discordLink: "https://discordapp.com/users/354679433853927445", - twitterLink: "https://twitter.com/ENT1T7", - image: Ent1T7Img, - team: "Creative", - }, - { - name: "Preeminent", - title: "Producer", - discordLink: "https://discordapp.com/users/797371848627191818", - twitterLink: "https://twitter.com/mikelauofficial", - image: PreeminentImg, - team: "Smol", - }, - { - name: "Animen", - title: "Pixel Artist", - discordLink: "https://discordapp.com/users/277435777783169024", - image: AnimenImg, - team: "Smol", - }, -]; - export const teams = [ "Core", "Creative", @@ -399,8 +143,6 @@ export const teams = [ "Smol", ]; -export type MemberT = (typeof teamMembers)[number]; - export const magicPurchaseLinks = [ { name: "Sushi", diff --git a/app/routes/team.tsx b/app/routes/team.tsx index 82c71c3..f90ebd7 100644 --- a/app/routes/team.tsx +++ b/app/routes/team.tsx @@ -1,8 +1,6 @@ import { Badge } from "~/components/Badge"; import { CTAButton } from "~/components/Button"; import { DiscordIcon, XIcon } from "~/components/Icons"; -import type { MemberT } from "~/const"; -import { teams, teamMembers } from "~/const"; import classNames from "clsx"; import TreasureTeamImg from "@/img/TreasureTeam.webp"; import DefaultPfpImg from "@/img/pfps/default.png"; @@ -17,6 +15,7 @@ import { } from "~/utils/seo"; import { commonHeaders } from "~/utils/misc.server"; import { Layout } from "~/components/Layout"; +import { useLoaderData } from "@remix-run/react"; export const headers: HeadersFunction = commonHeaders; @@ -34,7 +33,7 @@ export const meta: MetaFunction = ({ parentsData }) => { }); }; -const TeamCard = ({ member }: { member: MemberT }) => { +const TeamCard = ({ member }: { member: Member }) => { const hasSocials = member.twitterLink || member.discordLink; return (
@@ -84,7 +83,83 @@ const TeamCard = ({ member }: { member: MemberT }) => { ); }; +type Member = { + name: string; + title: string; + twitterLink?: string; + discordLink?: string; + image: string; +}; + +type GroupedMembers = { + [group: string]: Member[]; +}; + +function parseIssueContent(issueContent: string): GroupedMembers { + const groups: GroupedMembers = {}; + let currentGroup = ""; + let currentMember: Partial = {}; + + const lines = issueContent.split("\n"); + + for (const line of lines) { + const trimmedLine = line.trim(); + + // Handle new group + if (trimmedLine.startsWith("## ")) { + if (currentGroup && currentMember.name) { + groups[currentGroup].push(currentMember as Member); + } + currentGroup = trimmedLine.replace("## ", ""); + groups[currentGroup] = []; + currentMember = {}; + + // Handle new member + } else if (trimmedLine.startsWith("### ")) { + if (currentMember.name) { + groups[currentGroup].push(currentMember as Member); + } + currentMember = { name: trimmedLine.replace("### ", "") }; + + // Handle member details + } else if (trimmedLine.startsWith("- **Title**:")) { + currentMember.title = trimmedLine.split(": ")[1].trim(); + } else if (trimmedLine.startsWith("- **Image**:")) { + currentMember.image = trimmedLine.split(": ")[1].trim(); + } else if (trimmedLine.startsWith("- **Twitter**:")) { + currentMember.twitterLink = trimmedLine.split(": ")[1].trim(); + } else if (trimmedLine.startsWith("- **Discord**:")) { + currentMember.discordLink = trimmedLine.split(": ")[1].trim(); + } + } + + // Add the last member to the current group + if (currentGroup && currentMember.name) { + groups[currentGroup].push(currentMember as Member); + } + + return groups; +} + +export const loader = async () => { + const response = await fetch( + "https://api.github.com/repos/treasureProject/treasure-website/issues/290", + { + headers: { + Accept: "application/vnd.github.v3+json", + Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`, + }, + } + ); + + const res = await response.json(); + + return { teamMembers: parseIssueContent(res.body) }; +}; + export default function Team() { + const { teamMembers } = useLoaderData(); + return (
@@ -96,7 +171,7 @@ export default function Team() {
-
+

We are a collective of seasoned builders growing the expansive platform and decentralized game console that is Treasure. @@ -108,16 +183,11 @@ export default function Team() { economists, and gamers. All supported by a intimate and vibrant network of DAO contributors and passionate community members.

- Treasure Team
- {teams.map((team) => ( + {Object.entries(teamMembers).map(([team, members]) => (
- {teamMembers - .filter((member) => member.team === team) - .map((member) => ( - - ))} + {members.map((member) => ( + + ))}
))} + {/* {teams.map((team) => ( +
+

+ {team} +

+
+ {teamMembers + .filter((member) => member.team === team) + .map((member) => ( + + ))} +
+
+ ))} */}
diff --git a/public/img/pfps/Andy.png b/public/img/pfps/Andy.png deleted file mode 100644 index e36761e..0000000 Binary files a/public/img/pfps/Andy.png and /dev/null differ diff --git a/public/img/pfps/Animen.png b/public/img/pfps/Animen.png deleted file mode 100644 index 1ca5e0e..0000000 Binary files a/public/img/pfps/Animen.png and /dev/null differ diff --git a/public/img/pfps/Antlion.png b/public/img/pfps/Antlion.png deleted file mode 100644 index 7a57094..0000000 Binary files a/public/img/pfps/Antlion.png and /dev/null differ diff --git a/public/img/pfps/Bas.png b/public/img/pfps/Bas.png deleted file mode 100644 index 30121c1..0000000 Binary files a/public/img/pfps/Bas.png and /dev/null differ diff --git a/public/img/pfps/Crisis.png b/public/img/pfps/Crisis.png deleted file mode 100644 index 25be5f2..0000000 Binary files a/public/img/pfps/Crisis.png and /dev/null differ diff --git a/public/img/pfps/Daniel.png b/public/img/pfps/Daniel.png deleted file mode 100644 index 2ff6f79..0000000 Binary files a/public/img/pfps/Daniel.png and /dev/null differ diff --git a/public/img/pfps/DeathMonkey.png b/public/img/pfps/DeathMonkey.png deleted file mode 100644 index 93659d6..0000000 Binary files a/public/img/pfps/DeathMonkey.png and /dev/null differ diff --git a/public/img/pfps/ENT1T7.png b/public/img/pfps/ENT1T7.png deleted file mode 100644 index 717291f..0000000 Binary files a/public/img/pfps/ENT1T7.png and /dev/null differ diff --git a/public/img/pfps/Franny.png b/public/img/pfps/Franny.png deleted file mode 100644 index 89bb2cf..0000000 Binary files a/public/img/pfps/Franny.png and /dev/null differ diff --git a/public/img/pfps/Gina.png b/public/img/pfps/Gina.png deleted file mode 100644 index eab0057..0000000 Binary files a/public/img/pfps/Gina.png and /dev/null differ diff --git a/public/img/pfps/John.png b/public/img/pfps/John.png deleted file mode 100644 index e2bca04..0000000 Binary files a/public/img/pfps/John.png and /dev/null differ diff --git a/public/img/pfps/Jon.png b/public/img/pfps/Jon.png deleted file mode 100644 index 5c9c343..0000000 Binary files a/public/img/pfps/Jon.png and /dev/null differ diff --git a/public/img/pfps/Josh.png b/public/img/pfps/Josh.png deleted file mode 100644 index 510ad99..0000000 Binary files a/public/img/pfps/Josh.png and /dev/null differ diff --git a/public/img/pfps/Jpegape.png b/public/img/pfps/Jpegape.png deleted file mode 100644 index dcd4af3..0000000 Binary files a/public/img/pfps/Jpegape.png and /dev/null differ diff --git a/public/img/pfps/JustCheese.png b/public/img/pfps/JustCheese.png deleted file mode 100644 index c5ba30c..0000000 Binary files a/public/img/pfps/JustCheese.png and /dev/null differ diff --git a/public/img/pfps/Karel.png b/public/img/pfps/Karel.png deleted file mode 100644 index 09fcb8e..0000000 Binary files a/public/img/pfps/Karel.png and /dev/null differ diff --git a/public/img/pfps/MouseDev.webp b/public/img/pfps/MouseDev.webp deleted file mode 100644 index 1b6b188..0000000 Binary files a/public/img/pfps/MouseDev.webp and /dev/null differ diff --git a/public/img/pfps/Mulf.png b/public/img/pfps/Mulf.png deleted file mode 100644 index e355473..0000000 Binary files a/public/img/pfps/Mulf.png and /dev/null differ diff --git a/public/img/pfps/Noisewar.png b/public/img/pfps/Noisewar.png deleted file mode 100644 index 6f4e4c8..0000000 Binary files a/public/img/pfps/Noisewar.png and /dev/null differ diff --git a/public/img/pfps/Peita.png b/public/img/pfps/Peita.png deleted file mode 100644 index afdc652..0000000 Binary files a/public/img/pfps/Peita.png and /dev/null differ diff --git a/public/img/pfps/Peter.webp b/public/img/pfps/Peter.webp deleted file mode 100644 index 6da304e..0000000 Binary files a/public/img/pfps/Peter.webp and /dev/null differ diff --git a/public/img/pfps/Preeminent.png b/public/img/pfps/Preeminent.png deleted file mode 100644 index 7596f49..0000000 Binary files a/public/img/pfps/Preeminent.png and /dev/null differ diff --git a/public/img/pfps/Rappzula.png b/public/img/pfps/Rappzula.png deleted file mode 100644 index 2797775..0000000 Binary files a/public/img/pfps/Rappzula.png and /dev/null differ diff --git a/public/img/pfps/Sambino.png b/public/img/pfps/Sambino.png deleted file mode 100644 index c4bda5b..0000000 Binary files a/public/img/pfps/Sambino.png and /dev/null differ diff --git a/public/img/pfps/Sargon.png b/public/img/pfps/Sargon.png deleted file mode 100644 index 6a5579e..0000000 Binary files a/public/img/pfps/Sargon.png and /dev/null differ diff --git a/public/img/pfps/Vinny.png b/public/img/pfps/Vinny.png deleted file mode 100644 index d0edf36..0000000 Binary files a/public/img/pfps/Vinny.png and /dev/null differ diff --git a/public/img/pfps/Wagingbull.png b/public/img/pfps/Wagingbull.png deleted file mode 100644 index 8933538..0000000 Binary files a/public/img/pfps/Wagingbull.png and /dev/null differ diff --git a/public/img/pfps/X_.webp b/public/img/pfps/X_.webp deleted file mode 100644 index 77525e4..0000000 Binary files a/public/img/pfps/X_.webp and /dev/null differ diff --git a/public/img/pfps/Yen.png b/public/img/pfps/Yen.png deleted file mode 100644 index 6d7650d..0000000 Binary files a/public/img/pfps/Yen.png and /dev/null differ diff --git a/public/img/pfps/Yuri.png b/public/img/pfps/Yuri.png deleted file mode 100644 index fcfc039..0000000 Binary files a/public/img/pfps/Yuri.png and /dev/null differ diff --git a/public/img/pfps/Zak.png b/public/img/pfps/Zak.png deleted file mode 100644 index 7b16efe..0000000 Binary files a/public/img/pfps/Zak.png and /dev/null differ diff --git a/public/img/pfps/default.png b/public/img/pfps/default.png deleted file mode 100644 index ada2d10..0000000 Binary files a/public/img/pfps/default.png and /dev/null differ