diff --git a/src/assets/contributors.json b/src/assets/contributors.json index 553f0082a..0ad84e6ae 100644 --- a/src/assets/contributors.json +++ b/src/assets/contributors.json @@ -3,6 +3,7 @@ "developit", "andrewiggins", "JoviDeCroock", + "rschristian", "robertknight", "cristianbote", "ForsakenHarmony", @@ -10,17 +11,18 @@ "jviide", "AlexGalays", "rpetrich", - "pmkroeker", "sventschui", "k1r0s", + "fekete965", "38elements", "NekR", "mochiya98", + "pmkroeker", "mkxml", "wardpeet", - "valotas", + "shoonia", "AimWhy", - "rschristian", + "valotas", "tanhauhau", "braddunbar", "KevinDoughty", @@ -28,35 +30,22 @@ "kristoferbaxter", "gpoitch", "natevw", + "triallax", + "egdbear", "jmrog", + "samsam-ahmadi", "Rafi993", - "egdbear", - "mhmdanas", - "garybernhardt", - "harish2704", - "Download", - "yaodingyd", - "zouhir", "vutran", "billneff79", "calebeby", + "zouhir", + "yaodingyd", + "lilnasy", + "Download", + "Scott-Fischer", + "harish2704", + "garybernhardt", "Alexendoo", - "Almo7aya", - "aralroca", - "btm6084", - "btk5h", - "gcraftyg", - "guybedford", - "hadeeb", - "hbroer", - "jakearchibald", - "johakr", - "programbo", - "jridgewell", - "LukasBombach", - "lukeed", - "mxstbr", - "ngyikp", "JiLiZART", "kitten", "sangupta", @@ -64,142 +53,230 @@ "yuqianma", "paranoidjk", "ouzhenkun", + "Austaras", "Connormiha", "craftedsystems", - "amilajack", - "andybons", - "4cm4k1", - "bmeurer", - "cmlenz", - "vaneenige", - "impronunciable", - "btd", - "feross", - "jackmoore", - "scurker", - "jeremy-coleman", - "jdanford", - "jmfirth", - "matthewp", - "kruczy", - "namankheterpal", - "mitranim", - "siddharthkp", - "niedzielski", + "Almo7aya", + "aralroca", + "btm6084", + "btk5h", + "gcraftyg", + "guybedford", + "hadeeb", + "ngyikp", + "lukeed", + "LukasBombach", + "jridgewell", + "programbo", + "johakr", + "gengjiawen", + "jakearchibald", "futantan", "teodragovic", + "niedzielski", + "timgates42", + "siddharthkp", "utkarshkukreti", + "vaneenige", "boarwell", + "sebastiandotdev", + "deadem", "intrnl", "juicelink", "mseddon", "polemius", "rmacklin", "wojtczal", + "cbbfcd", + "3846masa", "asolove", "danielbayerlein", - "ddayguerrero", - "ivantm", - "jamesb3ll", "jrf0110", "RRDAWLX", + "ddayguerrero", + "jamesb3ll", + "jramanat-oracle", + "kuronijin", + "ivantm", + "marconi1992", + "cmlenz", + "Boshen", + "billti", + "bmeurer", + "4cm4k1", + "andybons", + "amilajack", + "impronunciable", + "zalishchuk", + "btd", + "DonIsaac", + "feross", + "ilogico", + "Popovkov57", + "PodaruDragos", + "mitranim", + "namankheterpal", + "kruczy", + "MicahZoltu", + "maxbrieiev", + "matthewp", + "Verseth", + "ianobermiller", + "jackmoore", + "scurker", + "jeremy-coleman", + "jdanford", + "jmfirth", "9renpoto", "wildlyinaccurate", - "mikestead", "squidfunk", + "shinyama-k", + "mbrukman", + "mikestead", + "Geo25rey", "kaisermann", "ctrlplusb", "z11h", "AlexanderOtavka", "toniopelo", "firatsarlar", - "david-nordvall", "hikouki", + "david-nordvall", + "vpzomtrrfrt", "vitormalencar", "lcxfs1991", "hassanbazzi", + "dragomano", "joaolucasl", "rosskhanas", "ddprrt", "huruji", "pazguille", - "addyosmani", "helloworld-hellohyeon", + "addyosmani", + "chakrakan", + "n0hack", "tao1991123", "blenderskool", - "ArsProgramma", + "ZUR1C4T0", "David-zzg", - "sapegin", - "dandv", - "Marabyte", - "shaedrich", - "Worble", - "rykdesjardins", - "whitebackdoor", + "Nayejun", "alexkrolick", - "Otto-AA", - "Anwardo", - "BartWaardenburg", - "guaiamum", - "belohlavek", - "Duske", - "montogeek", - "Jinex2012", - "joeldenning", - "Khaledgarbaya", - "ofgo", - "mbrukman", - "mozmorris", - "pradeepb6", - "digitalica", + "rykdesjardins", + "ieeah", + "Worble", + "shaedrich", "yhau1989", + "rcowsill", + "mikekidder", + "Marabyte", + "dandv", + "sapegin", + "TechQuery", "darvi-sh", + "ryuyz", + "digitalica", + "pradeepb6", + "processprocess", + "Nicolas-Orozco", + "mozmorris", + "ofgo", + "tinymachine", + "ttntm", "Vrq", "kuldeepkeshwar", "mikaturk", + "nbyfleet", "malcolmyu", "pl12133", "thawkin3", + "BartWaardenburg", + "Anwardo", + "Otto-AA", + "KiritaniAyaka", + "Byacrya", + "guaiamum", + "masto", + "belohlavek", + "Duske", + "Ende93", + "kidonng", + "Khaledgarbaya", + "joeldenning", + "EthanStandel", + "fabian-hiller", + "montogeek", + "jsejcksn", + "Jinex2012", + "gabrielcoronel", "bspaulding", + "janbiasi", + "bhollis", + "stevenle", "ooade", + "shelacek", "zgoda", "kolodziejczakM", "PuruVJ", + "TimDaub", "rkostrzewski", "jgierer12", "psabharwal123", - "jamesgeorge007", - "jonathantneal", - "StephanBijzitter", "harshitkumar31", + "StephanBijzitter", + "jonathantneal", + "jamesgeorge007", "thangngoc89", "SaraVieira", "knight-bubble", "DenysVuika", - "johnhaitas", - "davi-mbatista", - "framp", "VanTanev", + "johnhaitas", + "zubhav", + "lyubomir-bozhinov", "lwakefield", - "TheElegantDev", + "kentr", + "framp", + "davi-mbatista", + "dependabot-support", + "kevinweber", "Akiyamka", "pimdewit", "heithemmoumni", "bz2", + "jpnelson", "SolarLiner", + "einSelbst", "fisker", "MichaelDeBoey", + "watsonarw", + "jnpwebdeveloper", "seroy", "yyx990803", "FredKSchott", "PepsRyuu", "piotr-cz", - "sidujjain", + "takurinton", "EmilTholin", "matiasperz", - "AjayPoshak", - "michael-erskine", - "dbetteridge", "jbt", - "ElMassimo" + "wilberforce", + "dbetteridge", + "michael-erskine", + "AjayPoshak", + "ElMassimo", + "liamdon", + "sapphi-red", + "epiqueras", + "leerob", + "eddyw", + "CodyJasonBennett", + "XantreDev", + "billybimbob", + "nichoth", + "elliotwaite", + "Xstoudi", + "dcporter", + "prinsss", + "sand4rt" ] diff --git a/src/components/footer/index.jsx b/src/components/footer/index.jsx index b8a7a670c..51f978855 100644 --- a/src/components/footer/index.jsx +++ b/src/components/footer/index.jsx @@ -1,9 +1,8 @@ +import { useCallback } from 'preact/hooks'; import config from '../../config.json'; -import { useState, useEffect, useCallback } from 'preact/hooks'; -import { useRoute } from 'preact-iso'; -import style from './style.module.css'; import { useLanguage } from '../../lib/i18n'; import { useResource } from '../../lib/use-resource'; +import style from './style.module.css'; /* * To update the list, run: @@ -16,36 +15,25 @@ import { useResource } from '../../lib/use-resource'; * } * const repos = await api('/orgs/preactjs/repos?per_page=100'); * const list = new Set((await Promise.all(repos.map(r => getContribs(r.owner.login, r.name)))).flat().filter(n => !n.endsWith('-bot') && !n.endsWith('[bot]'))); - * copy(JSON.stringify(list, null, 2)); + * copy(JSON.stringify([...list], null, 2)); * * And paste the results into src/assets/contributors.json */ /** * Display a random contributor of the list above. - * @param {any[]} deps */ -function useContributors(deps) { +function useContributors() { const contributors = useResource(() => fetch('/contributors.json').then(r => r.json()), ['/contributors.json'] ); - const [value, setValue] = useState( - contributors ? contributors[new Date().getMonth()] : undefined - ); - - useEffect(() => { - if (contributors) - setValue(contributors[(Math.random() * (contributors.length - 1)) | 0]); - }, [...deps]); - - return value; + return contributors[(Math.random() * (contributors.length - 1)) | 0]; } export default function Footer() { - const { path } = useRoute(); - const contrib = useContributors([path]); + const contrib = useContributors(); const [lang, setLang] = useLanguage(); const onSelect = useCallback(e => setLang(e.target.value), [setLang]);