From 8317bcf486c81e5368caa4ca813a5e8c31e8cb3e Mon Sep 17 00:00:00 2001 From: Paul Copplestone Date: Thu, 3 Sep 2020 18:36:44 +0800 Subject: [PATCH] Adds the pill filters --- web/src/data/maintainers.json | 11 ++----- web/src/pages/oss.js | 54 +++++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/web/src/data/maintainers.json b/web/src/data/maintainers.json index 39d08923429..35f531b6cfc 100644 --- a/web/src/data/maintainers.json +++ b/web/src/data/maintainers.json @@ -6,7 +6,7 @@ }, { "handle": "lqmanh", - "description": "Heading up Python development", + "description": "Maintaining postgrest-py", "tags": [ "Python"] }, { @@ -16,17 +16,12 @@ }, { "handle": "aliharis", - "description": "Supporting up Python development", + "description": "Supporting Python development", "tags": [ "Python" ] }, { - "handle": "thorwebdev", + "handle": "logankilpatrick", "description": "Community oversight", "tags": [ "Community", "JS/TS" ] - }, - { - "handle": "thorwebdev", - "description": "Short description here", - "tags": [ "Community", "JS/TS" ] } ] diff --git a/web/src/pages/oss.js b/web/src/pages/oss.js index b42ff3a0a70..cad59e2b03c 100644 --- a/web/src/pages/oss.js +++ b/web/src/pages/oss.js @@ -7,8 +7,14 @@ import GithubCard from '../components/GithubCard' import { repos } from '../data/github' export default function Oss() { + const [activePill, setActivePill] = React.useState('All') const context = useDocusaurusContext() const { siteConfig = {} } = context + const maintainerTags = maintainers + .reduce((acc, x) => acc.concat(x.tags), []) // get all tags + .filter((v, i, a) => a.indexOf(v) === i) // remove duplicates + .sort((a, b) => a.localeCompare(b)) // alphabetical + const maintainerPills = ['All'].concat(maintainerTags) const tiers = [ { tier_name: '$5,000 a month', @@ -113,32 +119,38 @@ export default function Oss() {

Community Maintainers

- {maintainers.map((x, idx) => ( -
- -
-
-
- {x.handle} -
-
- ))} + +
+ ))}