From 1cdd3f009fb02555afbca4f8861e503e21f5f533 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Tue, 7 Mar 2023 10:14:59 -0500 Subject: [PATCH] Run formatter --- components/bio.js | 2 +- components/comma.js | 4 +- components/index/cards/bank.js | 18 +- components/index/cards/button.js | 12 +- components/index/cards/card-model.js | 9 +- components/index/cards/clubs.js | 14 +- components/index/cards/epoch.js | 9 +- components/index/cards/events.js | 8 +- components/index/cards/hackathons.js | 114 +++++----- components/index/cards/inspect.js | 4 +- components/index/cards/mailing-list.js | 275 +++++++++++++----------- components/index/cards/sinerider.js | 8 +- components/index/cards/slack.js | 9 +- components/index/cards/sprig-console.js | 7 +- components/index/cards/sprig.js | 9 +- components/index/cards/winter.js | 9 +- components/index/cards/workshops.js | 15 +- components/index/carousel-cards.js | 17 +- components/index/events.js | 8 +- components/index/github.js | 13 +- components/slack/join-form.js | 32 +-- components/winter/landing.js | 3 +- components/winter/timeline.js | 14 +- pages/api/games.js | 3 +- pages/api/github.js | 4 +- pages/api/join.js | 2 +- pages/api/mailing-list.js | 2 +- pages/api/slack.js | 7 +- pages/api/stars.js | 12 +- pages/donate.js | 2 +- pages/index.js | 11 +- pages/night.js | 9 +- pages/opensource.js | 23 +- pages/santa.js | 5 +- pages/team.js | 2 +- 35 files changed, 350 insertions(+), 345 deletions(-) diff --git a/components/bio.js b/components/bio.js index 2f5f5d6e..f2f38590 100644 --- a/components/bio.js +++ b/components/bio.js @@ -158,7 +158,7 @@ export default function Bio({ popup = true, spanTwo = false, ...props }) { }} onClick={() => setExpand(false)} > - + )} diff --git a/components/comma.js b/components/comma.js index e0cb252d..11efc608 100644 --- a/components/comma.js +++ b/components/comma.js @@ -1,3 +1,5 @@ export default function Comma({ children }) { - return children ? children.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') : '' + return children + ? children.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + : '' } diff --git a/components/index/cards/bank.js b/components/index/cards/bank.js index f11cd45f..348b88ad 100644 --- a/components/index/cards/bank.js +++ b/components/index/cards/bank.js @@ -1,10 +1,5 @@ import CardModel from './card-model' -import { - Box, - Grid, - Heading, - Text -} from 'theme-ui' +import { Box, Grid, Heading, Text } from 'theme-ui' import { Fade } from 'react-reveal' import Buttons from './button' @@ -22,19 +17,22 @@ export default function Bank({ data }) { backgroundImage: `linear-gradient(to bottom,rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)), url('/home/hackathons-bg.webp')`, backgroundSize: 'cover', backgroundPosition: '40%', - color: 'snow', + color: 'snow' }} badge text={data[0]} > - + Hack Club Bank - Become a 501(c)3 nonprofit and join 700+ teams using Hack Club - Bank to run world-class events. + Become a 501(c)3 nonprofit and join 700+ teams using + Hack Club Bank to run world-class events. This platform is built and maintained by the Hack Club team. diff --git a/components/index/cards/button.js b/components/index/cards/button.js index 03f0b0ed..0512a43c 100644 --- a/components/index/cards/button.js +++ b/components/index/cards/button.js @@ -1,9 +1,5 @@ import React, { useState } from 'react' -import { - Box, - Button, - Text -} from 'theme-ui' +import { Box, Button, Text } from 'theme-ui' import ReactTooltip from 'react-tooltip' import Icon from '@hackclub/icons' /** @jsxImportSource theme-ui */ @@ -20,7 +16,11 @@ export default function Buttons({ let fontWeight = primary != null ? '700' : '400' return ( - + - - + return ( + + + + + + Stay in Touch + + + We’ll send you an email no more than once a month, when we work on + something cool for you. + + + + + + +
+ +
+ +
+
- {submitted && ( - - - You're on the list! - - )} -
- -
- ); -}; + {submitted && ( + + + You're on the list! + + )} + + + + ) +} -export default MailingList; +export default MailingList diff --git a/components/index/cards/sinerider.js b/components/index/cards/sinerider.js index 20f4fae5..db23169e 100644 --- a/components/index/cards/sinerider.js +++ b/components/index/cards/sinerider.js @@ -1,11 +1,5 @@ import CardModel from './card-model' -import { - Box, - Flex, - Grid, - Image, - Text -} from 'theme-ui' +import { Box, Flex, Grid, Image, Text } from 'theme-ui' import Buttons from './button' /** @jsxImportSource theme-ui */ diff --git a/components/index/cards/slack.js b/components/index/cards/slack.js index 68f0ac21..7de382b7 100644 --- a/components/index/cards/slack.js +++ b/components/index/cards/slack.js @@ -96,8 +96,8 @@ export default function Slack({ data, slackKey, events }) { just hang out. - Occasionally we invite someone we really want to speak to (like - Sal Khan, George Hotz, and Lady Ada) and host an{' '} + Occasionally we invite someone we really want to speak to (like Sal + Khan, George Hotz, and Lady Ada) and host an{' '} - + - + diff --git a/components/index/events.js b/components/index/events.js index 5ef72384..05aa94d8 100644 --- a/components/index/events.js +++ b/components/index/events.js @@ -124,9 +124,11 @@ export default function Events({ events }) { boxShadow: 'elevated' }} > - {events.slice(0, 3).map(event => - !past(event.end) ? : <> - )} + {events + .slice(0, 3) + .map(event => + !past(event.end) ? : <> + )} ) diff --git a/components/index/github.js b/components/index/github.js index 6e7f81e8..294ed502 100644 --- a/components/index/github.js +++ b/components/index/github.js @@ -1,8 +1,4 @@ -import { - Badge, - Link, - Text -} from 'theme-ui' +import { Badge, Link, Text } from 'theme-ui' import { useEffect, useState } from 'react' import RelativeTime from 'react-relative-time' import Fade from 'react-reveal/Fade' @@ -76,7 +72,12 @@ export default function GitHub({ display: 'inline-block', overflow: 'hidden', whiteSpace: 'nowrap', - display: ['none', 'inline-block', 'inline-block', 'inline-block'] + display: [ + 'none', + 'inline-block', + 'inline-block', + 'inline-block' + ] }} > {user} diff --git a/components/slack/join-form.js b/components/slack/join-form.js index f2f4733c..d5b5b154 100644 --- a/components/slack/join-form.js +++ b/components/slack/join-form.js @@ -1,4 +1,13 @@ -import { Card, Label, Input, Textarea, Select, Grid, Text, Link } from 'theme-ui' +import { + Card, + Label, + Input, + Textarea, + Select, + Grid, + Text, + Link +} from 'theme-ui' import { useRouter } from 'next/router' import useForm from '../../lib/use-form' import Submit from '../submit' @@ -87,11 +96,12 @@ const JoinForm = ({ sx = {} }) => { variant="caption" color="secondary" as="div" - sx={{ maxWidth: "600px", textAlign: 'center', mb: 2 }} + sx={{ maxWidth: '600px', textAlign: 'center', mb: 2 }} > - Hold your horses! Our Slack community is for teenagers, and as such - we're really careful about letting adults join. If you feel you'd - have a place here, reach out to slack@hackclub.com. + Hold your horses! Our Slack community is for teenagers, and + as such we're really careful about letting adults join. If you feel + you'd have a place here, reach out to{' '} + slack@hackclub.com. )} {!isAdult && ( @@ -99,15 +109,11 @@ const JoinForm = ({ sx = {} }) => { status={status} mt={'0px!important'} labels={{ - default: - useWaitlist - ? 'Join Waitlist' - : 'Get Invite', + default: useWaitlist ? 'Join Waitlist' : 'Get Invite', error: 'Something went wrong', - success: - useWaitlist - ? "We'll be in touch soon!" - : 'Email coming soon!' + success: useWaitlist + ? "We'll be in touch soon!" + : 'Email coming soon!' }} /> )} diff --git a/components/winter/landing.js b/components/winter/landing.js index 40d98449..95a9c1d1 100644 --- a/components/winter/landing.js +++ b/components/winter/landing.js @@ -67,8 +67,7 @@ export default function Landing({ rsvpCount }) { // fontSize: ['18px', '20px', '24px'] }} > - {/* */} - a hacker's + {/* */}a hacker's
diff --git a/components/winter/timeline.js b/components/winter/timeline.js index 2d44a82d..30fa27bc 100644 --- a/components/winter/timeline.js +++ b/components/winter/timeline.js @@ -113,7 +113,19 @@ export default function RealTimeline() { RSVPs are closed. Have a question? Here are the FAQs.} + name={ + <> + RSVPs are closed. Have a question? Here are the{' '} + + FAQs + + . + + } duration="RSVP" /> r.text()) res.json(resp) } -} \ No newline at end of file +} diff --git a/pages/api/slack.js b/pages/api/slack.js index c2268175..b81e248e 100644 --- a/pages/api/slack.js +++ b/pages/api/slack.js @@ -1,7 +1,8 @@ import FormData from 'form-data' export async function Slack() { - if (!process.env.SLACK_API_TOKEN) return { error: 'No Slack API token found!' } + if (!process.env.SLACK_API_TOKEN) + return { error: 'No Slack API token found!' } const formData = new FormData() @@ -20,7 +21,7 @@ export async function Slack() { ).then(r => r.json()) if (!slackData || !slackData.stats) { - console.warn("No slack data"); + console.warn('No slack data') return {} } else { return slackData.stats.sort((a, b) => a.ds - b.ds).reverse()[0] @@ -29,4 +30,4 @@ export async function Slack() { export default async function Slacky(req, res) { res.status(200).json(await Slack()) -} \ No newline at end of file +} diff --git a/pages/api/stars.js b/pages/api/stars.js index b84962bc..af37486c 100644 --- a/pages/api/stars.js +++ b/pages/api/stars.js @@ -2,8 +2,16 @@ import { graphql } from '@octokit/graphql' export async function fetchStars() { if (!process.env.GITHUB_TOKEN) { - console.warn("Note - GITHUB_TOKEN not defined, stars will not be fetched from github") - return { sprig:"?", sinerider:"?", sprigHardware:"?", hackclub:"?", hackathons:"?"}; + console.warn( + 'Note - GITHUB_TOKEN not defined, stars will not be fetched from github' + ) + return { + sprig: '?', + sinerider: '?', + sprigHardware: '?', + hackclub: '?', + hackathons: '?' + } } const { organization } = await graphql( ` diff --git a/pages/donate.js b/pages/donate.js index c0c61353..39190f6d 100644 --- a/pages/donate.js +++ b/pages/donate.js @@ -101,7 +101,7 @@ const FirstQuote = styled(Quote)` rgb(45, 228, 207), rgb(41, 206, 104), rgb(53, 181, 36) - ); ; + ); ` const SecondQuote = styled(Quote)` background-image: radial-gradient( diff --git a/pages/index.js b/pages/index.js index 9895cd8b..8eed4441 100644 --- a/pages/index.js +++ b/pages/index.js @@ -857,7 +857,11 @@ function Page({ }} > - + We've got a lot going on - Let’s recap - + ( Hack Night - The Hack Club community regularly gathers on Zoom or Huddles. It’s a chance - to meet new friends, livestream what you’re hacking on, or just hang - out on a chill call. + The Hack Club community regularly gathers on Zoom or Huddles. It’s a + chance to meet new friends, livestream what you’re hacking on, or just + hang out on a chill call. - Join in Saturdays at 1pm or 11pm UTC, and Wednesdays at 6pm UTC, or join or start an impromptu Hack session on{' '} + Join in Saturdays at 1pm or 11pm UTC, and Wednesdays at 6pm UTC, or + join or start an impromptu Hack session on{' '} #hack-night diff --git a/pages/opensource.js b/pages/opensource.js index 8b5aae01..553f41b0 100644 --- a/pages/opensource.js +++ b/pages/opensource.js @@ -105,14 +105,13 @@ const Page = ({ repos, transparentAccounts }) => ( All open sourced through Hack Club Bank Transparency Mode. - {transparentAccounts - .map(account => ( - - ))} + {transparentAccounts.map(account => ( + + ))} res.json())).filter(account => account.category.replaceAll(' ', '_') === 'hack_club_hq') + const transparentAccounts = ( + await fetch('https://bank.hackclub.com/api/v3/organizations').then(res => + res.json() + ) + ).filter(account => account.category.replaceAll(' ', '_') === 'hack_club_hq') return { props: { repos, transparentAccounts }, revalidate: 30 } } diff --git a/pages/santa.js b/pages/santa.js index 667cb6f8..9f16c345 100644 --- a/pages/santa.js +++ b/pages/santa.js @@ -192,7 +192,10 @@ function Signup() { Be sure to check out the{' '} - + rules {' '} before you sign up! diff --git a/pages/team.js b/pages/team.js index 3e064b49..c21844bb 100644 --- a/pages/team.js +++ b/pages/team.js @@ -377,7 +377,7 @@ export default function Team() { /> - +