From c35607250ae2cfca7732723f93ee8b9b586743c4 Mon Sep 17 00:00:00 2001 From: Adam Xu Date: Tue, 11 Mar 2025 15:47:01 -0700 Subject: [PATCH 1/4] skibidi changes --- pages/silicon-valley.js | 59 +++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/pages/silicon-valley.js b/pages/silicon-valley.js index 0a3cdbba..5c65e094 100644 --- a/pages/silicon-valley.js +++ b/pages/silicon-valley.js @@ -137,7 +137,6 @@ export default function SiliconValley() { }, []) useEffect(() => { - // Move all window-related code inside useEffect const urlParams = new URLSearchParams(window.location.search) const referParam = urlParams.get('refer') @@ -149,7 +148,7 @@ export default function SiliconValley() { setRefer(storedRefer) } console.log('refer', refer) - }, []) // Empty dependency array means this runs once on mount + }, []) return ( + + + + Sign Up! + + + Join our Discord! @@ -601,8 +644,7 @@ export default function SiliconValley() { textAlign: 'center' }} > - Scrapyard Silicon Valley is a two-day event - HERE'S THE ROUGH - SCHEDULE! + Scrapyard Silicon Valley is a 12 hour event - Here's a rough schedule! Sign Up for Scrapyard Silicon Valley From 4d8c91f0110806675fc14b41e01ca50e5e7d5129 Mon Sep 17 00:00:00 2001 From: Adam Xu Date: Tue, 11 Mar 2025 22:32:03 -0700 Subject: [PATCH 2/4] yesn't --- pages/silicon-valley.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pages/silicon-valley.js b/pages/silicon-valley.js index 5c65e094..92f9c8ef 100644 --- a/pages/silicon-valley.js +++ b/pages/silicon-valley.js @@ -1390,10 +1390,8 @@ export default function SiliconValley() { ), 'What do I need?': ( <> - Your laptop, chargers, and an open mind! If you're going to an - overnight event, bring toiletries and sleeping bagstoo. - Additionally, if you plan to work on a hardware project, bring - the tools you'll need. + Your laptop, chargers, and an open mind! Additionally, if you + plan to work on a hardware project, bring the tools you'll need. ), 'I’m not good at coding. Can I still participate?': ( @@ -1570,7 +1568,11 @@ export default function SiliconValley() { ) : ( <> +

+ Please wait while we redirect you to complete your sign up... +

{ e.preventDefault() const email = document.getElementById('email').value @@ -1584,6 +1586,10 @@ export default function SiliconValley() { } try { + // hide the form and show a loading indicator + document.getElementById('refer-form').style.display = 'none' + document.getElementById('loading-indicator').style.display = + 'block' const response = await fetch('/api/silicon-valley/refer', { method: 'POST', headers: { From 233b0f7f8b274213f87a2042459fbd0c83f2f649 Mon Sep 17 00:00:00 2001 From: Adam Xu Date: Tue, 11 Mar 2025 22:33:22 -0700 Subject: [PATCH 3/4] redirects --- next.config.js | 7 +- pages/san-jose.js | 843 ---------------------------------------------- 2 files changed, 6 insertions(+), 844 deletions(-) delete mode 100644 pages/san-jose.js diff --git a/next.config.js b/next.config.js index 9715a219..b67246d7 100644 --- a/next.config.js +++ b/next.config.js @@ -34,7 +34,12 @@ module.exports = withMDX({ }, { source: '/san-francisco', - destination: 'https://scrapyardsf.com', + destination: '/silicon-valley', + permanent: true + }, + { + source: '/san-jose', + destination: '/silicon-valley', permanent: true }, { diff --git a/pages/san-jose.js b/pages/san-jose.js deleted file mode 100644 index f39c0568..00000000 --- a/pages/san-jose.js +++ /dev/null @@ -1,843 +0,0 @@ -'======== READ ME BEFORE EDITING ========' -/* -Hello! This is the template for the city pages. - -To create a new page, make a copy of this file in the same directory (pages) and rename it for your city. -E.g. if your city is Tampa, rename the copy of this file to tampa.js - -Replace all placeholder info, indicated by "TODO" comments (you can use Ctrl+F) in this file -You do not need to use this template exactly, feel free to customize it as much as you see fit. - -If you want to include additional assets, please add them under public/city/your-city-name. - -Make a PR and we'll review it as soon as we can! - -If you have any questions, send a message to the #scrapyard channel on the Hack Club Slack and we'll try to help. - -P.S. Feel free to delete this comment block when you're done! - -Note: To test your changes locally, use `yarn install` and `yarn dev`. -*/ - -import Head from 'next/head' -import { Box, Card, Grid, Heading, Image, Link, Text } from 'theme-ui' -import dynamic from 'next/dynamic' - -// TODO: Change this schedule to your own! -const schedule = [ - { time: 'The schedule is', event: 'TBA!' } - /*{ time: '12:00 PM', event: 'Opening ceremony' }, - { time: '12:30 PM', event: 'Lunch' }, - { time: '1:00 PM', event: 'Start working on your project!' }, - { time: '2:00 PM', event: 'Workshop 1' }, - { time: '4:00 PM', event: 'Activity 1' }, - { time: '4:00 PM', event: 'Workshop 2' }, - { time: '6:00 PM', event: 'Dinner' }, - { time: '8:00 PM', event: 'Lightning talks' }, - { time: '12:00 AM', event: 'Midnight surprise' }, - { time: '8:00 AM', event: 'Breakfast' }, - { time: '10:30 AM', event: 'Demos!' }, - { time: '12:00 PM', event: 'Closing ceremony' }*/ -] - -const Map = dynamic(() => import('../components/Map'), { ssr: false }) - -const Flag = () => ( - - Hack Club flag - -) - -export default function ExampleCity() { - return ( - - - {/* TODO: Change [EXAMPLECITY] to your event's city */} - Scrapyard San Jose - - - - - Scrapyard - - - - - Build stupid stuff, get stupid prizes. - - - - - {/* TODO: Change [EXAMPLECITY] to your event's city */} - San Jose - March 15-16 - - - - - Blue paper star - Yellow paper star - Pink paper star - - - - - SIGN UP - - - - - - - - - - - - - - {/* TODO: Change [EXAMPLECITY] to your event's city */} - What's Scrapyard San Jose? - -

- {/* TODO: Change [EXAMPLECITY] to your event's city */} - Scrapyard San Jose is a hackathon for high schoolers - {/* TODO: Change [EXAMPLECITY] to your event's city */} - happening in San Jose, where you can make the stupidest things you - can think of! Anything, from a{' '} - - lamp that flashes faster the slower you type - - , to those ideas that you wouldn't dare to consider to be useful, - goes at Scrapyard. No matter your experience, Scrapyard - {/* TODO: Change [EXAMPLECITY] to your event's city */} - San Jose needs you and your scrappy ideas! -

-
-
- - - - - - - - - - -
- - - - - - - {/* TODO: Change [EXAMPLECITY] to your event's city */} - WHAT'S HAPPENING AT SCRAPYARD San Jose? - - - - {/* TODO: Change [EXAMPLECITY] to your event's city */} - {/* TODO: Change [DURATION] to your event's duration (12hour, 24hour, 2-day) */} - Scrapyard San Jose is a 1 day event - HERE'S THE ROUGH SCHEDULE! - - - {schedule.map((item, i) => ( -
- - {item.event} - - -

{item.time}

-
- ))} -
-
- - - - - {/* TODO: Change [EXAMPLECITY] to your event's city */} - CAN'T MAKE IT TO SAN JOSE? - - - - THERE ARE 100+ OTHER SCRAPYARD EVENTS HAPPENING AROUND THE WORLD! - - - - - - - - - Frequently Asked Questions - - - - {Object.entries({ - 'Who can participate in Scrapyard?': ( - <> - All high-school & upper-middle-school aged students are welcome - to come! You don't have to be a member of the Hack Club - community or be a Hack Club leader. - - ), - 'All this, for free?': ( - <> - Yep! Food, swag and good vibes are all included. Plus, if you’re - joining us from afar,{' '} - - we’ll cover the cost of gas or a bus / train ticket - - . - - ), - 'What do I need?': ( - <> - Your laptop, chargers, and an open mind! If you're going to an - overnight event, bring toiletries and sleeping bagstoo. - Additionally, if you plan to work on a hardware project, bring - the tools you'll need. - - ), - 'I’m not good at coding. Can I still participate?': ( - <> - This hackathon is for creatives of all skill levels! We'll have - workshops and other events so join us and let's learn together. - If you'd like to start exploring some introductory projects, - check out Hack Club Workshops. - - ), - 'What can I make at Scrapyard?': ( - <> - The scrappiest thing you can imagine –- jank is encouraged. - Games? Apps? Websites? Programming languages? Hardware?{' '} - You name it! We’ll have a bunch of resources and mentors to help - you out. - - ), - 'What has Hack Club done before?': ( - <> - Hack Club has run an{' '} - - overnight hackathon - {' '} - in San Francisco, a{' '} - - Game Jam - {' '} - across 50 cities, a hackathon on a{' '} - - Train - {' '} - from Vermont to Los Angeles, and much more! - - ), - 'What if my parents are concerned?': ( - <> - We’re here to help! Our parents guide will be released soon, but - they can reach out to us at{' '} - {/* TODO: Change this email to your event's email */} - - {/* TODO: Change this email to your event's email */} - san-jose@scrapyard.hackclub.com - {' '} - for questions. - - ), - 'What if I have more questions?': ( - <> - {/* TODO: Change [SLACKCHANNEL] to the name of your event's Slack channel */} - Contact us! Feel free to reach out to us in the - #scrapyard-san-jose channel on the Hack Club slack or email us - at {/* TODO: Change this email to your event's email */} - - {/* TODO: Change this email to your event's email */} - san-jose@scrapyard.hackclub.com - - . - - ) - }).map(([question, answer], i) => { - return ( - - - {question} - - - - {answer} - - - ) - })} - - - - - {/* TODO: Change [EXAMPLECITY] to your event's city */} - SIGN UP FOR SCRAPYARD SAN JOSE - - - - - Scrapyard - - - - Made with ♡ by teenagers, for teenagers at Hack Club - - - Hack Club{' '} - {' '} - Slack{' '} - {' '} - Clubs{' '} - {' '} - Hackathons - - -
- ) -} From 9345e103addefcef7f2fdc5114ce9f708b7459cf Mon Sep 17 00:00:00 2001 From: Adam Xu Date: Wed, 12 Mar 2025 21:34:24 -0700 Subject: [PATCH 4/4] made changes yolo --- next.config.js | 51 ----------------------------------------- pages/silicon-valley.js | 4 ++-- 2 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 next.config.js diff --git a/next.config.js b/next.config.js deleted file mode 100644 index b67246d7..00000000 --- a/next.config.js +++ /dev/null @@ -1,51 +0,0 @@ -const withMDX = require('@next/mdx')({ extension: /\.mdx?$/ }) -module.exports = withMDX({ - pageExtensions: ['js', 'jsx', 'mdx'], - redirects: () => [ - { - source: '/busan', - destination: 'https://scrapyard.hackclub.com/busan/kr', - permanent: true - }, - { - source: '/hongkong', - destination: 'https://scrapyard.hk', - permanent: true - }, - { - source: '/taiwan', - destination: 'https://scrapyard.hackit.tw', - permanent: true - }, - { - source: '/siliconvalley', - destination: '/silicon-valley', - permanent: true - }, - { - source: '/cleveland', - destination: 'https://scrapyardcle.org', - permanent: true - }, - { - source: '/lisbon', - destination: 'https://scrapyard.pt', - permanent: true - }, - { - source: '/san-francisco', - destination: '/silicon-valley', - permanent: true - }, - { - source: '/san-jose', - destination: '/silicon-valley', - permanent: true - }, - { - source: '/boston/home', - destination: 'https://scrapyard.hackclub.com/boston', - permanent: true - } - ] -}) diff --git a/pages/silicon-valley.js b/pages/silicon-valley.js index 92f9c8ef..dc955286 100644 --- a/pages/silicon-valley.js +++ b/pages/silicon-valley.js @@ -167,7 +167,7 @@ export default function SiliconValley() { - March 15-16 • Hacker Dojo • Mountain View, CA + March 15 • Hacker Dojo • Mountain View, CA