From 41e4c824d1682102f49161efb6579274c66efa5f Mon Sep 17 00:00:00 2001 From: Ollie Halliday <22655069+Hallidayo@users.noreply.github.com> Date: Sat, 18 Jun 2022 14:23:53 +0100 Subject: [PATCH] ran prettier --- web/src/components/Sponsors.js | 63 ++++++++++++++++------------------ web/src/pages/oss.js | 48 ++++++++++++++------------ 2 files changed, 55 insertions(+), 56 deletions(-) diff --git a/web/src/components/Sponsors.js b/web/src/components/Sponsors.js index fb2b18ba3d3..47bf8613d5f 100644 --- a/web/src/components/Sponsors.js +++ b/web/src/components/Sponsors.js @@ -1,71 +1,66 @@ import React from 'react' import sponsors from '@site/src/data/sponsors.json' - export default function Sponsors() { - const tiers = [ { tier_name: '$5,000 a month', heading: 'Enterprise: $5,000 per month', - transactions: sponsors.filter((x) => (x.tier == '$5,000 a month')), + transactions: sponsors.filter((x) => x.tier == '$5,000 a month'), }, { tier_name: '$2,500 a month', heading: 'Agency: $2,500 per month', - transactions: sponsors.filter((x) => (x.tier == '$2,500 a month')), + transactions: sponsors.filter((x) => x.tier == '$2,500 a month'), }, { tier_name: '$1,000 a month', heading: 'Startup: $1,000 per month', - transactions: sponsors.filter((x) => (x.tier == '$1,000 a month')), + transactions: sponsors.filter((x) => x.tier == '$1,000 a month'), }, { tier_name: '$49 a month', heading: 'Evangelist: $49 per month', - transactions: sponsors.filter((x) => (x.tier == '$49 a month')), + transactions: sponsors.filter((x) => x.tier == '$49 a month'), }, { tier_name: '$19 a month', heading: 'Supporter: $19 per month', - transactions: sponsors.filter((x) => (x.tier == '$19 a month')), + transactions: sponsors.filter((x) => x.tier == '$19 a month'), }, { tier_name: '$5 a month', heading: 'Contributor: $5 per month', - transactions: sponsors.filter((x) => (x.tier == '$5 a month')), + transactions: sponsors.filter((x) => x.tier == '$5 a month'), }, ] return ( -
- - {tiers.map( - (t,index) => - !!t.transactions.length && ( -
-

{t.heading}

-
- {t.transactions.map((x, index) => ( -
- - -
-
{x.sponsor}
-
-
+
+ {tiers.map( + (t, index) => + !!t.transactions.length && ( +
+

{t.heading}

+
+ {t.transactions.map((x, index) => ( + -
-
- ) - )} - + ))} +
+
+
+ ) + )}
) } - diff --git a/web/src/pages/oss.js b/web/src/pages/oss.js index ea88423cf5c..f3cae071d1b 100644 --- a/web/src/pages/oss.js +++ b/web/src/pages/oss.js @@ -1,5 +1,5 @@ import React from 'react' -import { Octokit } from "@octokit/core" +import { Octokit } from '@octokit/core' import Layout from '@theme/Layout' import useDocusaurusContext from '@docusaurus/useDocusaurusContext' import sponsors from '../data/sponsors.json' @@ -9,7 +9,7 @@ import GithubCard from '../components/GithubCard' import Sponsors from '../components/Sponsors' export default function Oss() { - const octokit = new Octokit(); + const octokit = new Octokit() const [activePill, setActivePill] = React.useState('All') const [repos, setRepos] = React.useState([]) @@ -24,14 +24,18 @@ export default function Oss() { const maintainerPills = ['All'].concat(maintainerTags) React.useEffect(async () => { - const reposResponse = await octokit.request("GET /orgs/{org}/repos", { - org: "supabase", - type: "public", + const reposResponse = await octokit.request('GET /orgs/{org}/repos', { + org: 'supabase', + type: 'public', per_page: 6, - page: 1 - }); + page: 1, + }) - setRepos(reposResponse.data.filter((r) => !!r.stargazers_count).sort((a, b) => b.stargazers_count - a.stargazers_count)) + setRepos( + reposResponse.data + .filter((r) => !!r.stargazers_count) + .sort((a, b) => b.stargazers_count - a.stargazers_count) + ) }) return ( @@ -63,7 +67,7 @@ export default function Oss() {

Community Maintainers

-
    +
      {maintainerPills.map((x) => (
    • Repositories

      - {repos.length < 1 &&
      -
      } - {repos.length >= 1 && repos.map((props, idx) => ( -
      - -
      - ))} + {repos.length < 1 &&
      } + {repos.length >= 1 && + repos.map((props, idx) => ( +
      + +
      + ))}