mirror of
https://github.com/System-End/site.git
synced 2026-04-19 20:55:09 +00:00
Codebase Cleanup
This commit is contained in:
parent
3e2b304427
commit
f3f91d9003
14 changed files with 13 additions and 30 deletions
|
|
@ -16,7 +16,6 @@ const WorkshopCard = ({
|
||||||
}) => (
|
}) => (
|
||||||
<Card
|
<Card
|
||||||
href={`https://workshops.hackclub.com/${slug}`}
|
href={`https://workshops.hackclub.com/${slug}`}
|
||||||
passHref
|
|
||||||
as="a"
|
as="a"
|
||||||
variant="interactive"
|
variant="interactive"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ function Dot() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Events({ events }) {
|
export default function Events({ events }) {
|
||||||
console.log(events.length)
|
|
||||||
return (
|
return (
|
||||||
<Box mb={3}>
|
<Box mb={3}>
|
||||||
<Grid
|
<Grid
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const SlackEvents = ({ sx, color, textColor, ...props }) => {
|
||||||
`/api/channels/resolve/?id=${lastJsonMessage.channel}`
|
`/api/channels/resolve/?id=${lastJsonMessage.channel}`
|
||||||
)
|
)
|
||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
.catch(err => console.log(err))
|
.catch(err => console.error(err))
|
||||||
|
|
||||||
if (whitelistedChannels.has(name)) {
|
if (whitelistedChannels.has(name)) {
|
||||||
//this check should happen before the web req, to save on net resources
|
//this check should happen before the web req, to save on net resources
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ const useForm = (
|
||||||
})
|
})
|
||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
.then(r => {
|
.then(r => {
|
||||||
console.log('Form success!')
|
|
||||||
setStatus('success')
|
setStatus('success')
|
||||||
if (callback) callback(r)
|
if (callback) callback(r)
|
||||||
setTimeout(() => setStatus('default'), 3500)
|
setTimeout(() => setStatus('default'), 3500)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ export default function Geohot() {
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
console.log('hi')
|
|
||||||
}, milliseconds)
|
}, milliseconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ export default function Sal() {
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
console.log('hi')
|
|
||||||
}, milliseconds)
|
}, milliseconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,9 @@ export default async function handler(req, res) {
|
||||||
'Slack Username': data.slackUsername
|
'Slack Username': data.slackUsername
|
||||||
})
|
})
|
||||||
res.writeHead(302, { Location: '/bank/apply/success' }).end()
|
res.writeHead(302, { Location: '/bank/apply/success' }).end()
|
||||||
console.log(r)
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error)
|
console.error(error)
|
||||||
res.writeHead(500, {
|
res.writeHead(500, {
|
||||||
Location: `/bank/apply?step=3&airtable-error=${error}`
|
Location: `/bank/apply?step=3&airtable-error=${error}`
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,6 @@ export default async function handler(req, res) {
|
||||||
})
|
})
|
||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
.then(async r => {
|
.then(async r => {
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
await applicationsTable.create({
|
await applicationsTable.create({
|
||||||
'Email Address': data.userEmail,
|
'Email Address': data.userEmail,
|
||||||
'Event Name': `${data.eventName} (${data.teamType} ${data.teamNumber})`,
|
'Event Name': `${data.eventName} (${data.teamType} ${data.teamNumber})`,
|
||||||
|
|
@ -40,7 +38,7 @@ export default async function handler(req, res) {
|
||||||
.json({ message: 'Success! Check your email for next steps.' })
|
.json({ message: 'Success! Check your email for next steps.' })
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error)
|
console.error(error)
|
||||||
res.json({ status: 'Something went wrong', error })
|
res.json({ status: 'Something went wrong', error })
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ export default async function handler(req, res) {
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!channelDataReq.ok) {
|
if (!channelDataReq.ok) {
|
||||||
console.log(await channelDataReq.text())
|
console.warn(await channelDataReq.text())
|
||||||
return res.status(503).end()
|
return res.status(503).end()
|
||||||
}
|
}
|
||||||
|
|
||||||
const channelData = await channelDataReq.json()
|
const channelData = await channelDataReq.json()
|
||||||
if (!channelData.ok) {
|
if (!channelData.ok) {
|
||||||
console.log(channelData)
|
console.warn(channelData)
|
||||||
return res.status(400).end()
|
return res.status(400).end()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ const joinTable = new AirtablePlus({
|
||||||
})
|
})
|
||||||
|
|
||||||
async function postData(url = '', data = {}, headers = {}) {
|
async function postData(url = '', data = {}, headers = {}) {
|
||||||
console.log(data)
|
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
|
|
@ -84,7 +83,6 @@ export default async function handler(req, res) {
|
||||||
},
|
},
|
||||||
{ authorization: `Bearer ${process.env.TORIEL_KEY}` }
|
{ authorization: `Bearer ${process.env.TORIEL_KEY}` }
|
||||||
)
|
)
|
||||||
console.log(result)
|
|
||||||
res.json({ status: 'success', message: 'You’ve been invited to Slack!' })
|
res.json({ status: 'success', message: 'You’ve been invited to Slack!' })
|
||||||
} else {
|
} else {
|
||||||
res.json({
|
res.json({
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ export default async function handler(req, res) {
|
||||||
filterByFormula: `AND({Email} = '${data.email}', {Is Valid?} = '1', {Club} = '')`
|
filterByFormula: `AND({Email} = '${data.email}', {Is Valid?} = '1', {Club} = '')`
|
||||||
})
|
})
|
||||||
)[0]
|
)[0]
|
||||||
console.log('address', address)
|
|
||||||
if (!address) {
|
if (!address) {
|
||||||
address = await addressesTable.create({
|
address = await addressesTable.create({
|
||||||
'Street (First Line)': data.addressFirst,
|
'Street (First Line)': data.addressFirst,
|
||||||
|
|
@ -43,8 +43,6 @@ export default async function handler(req, res) {
|
||||||
Country: data.country,
|
Country: data.country,
|
||||||
Person: [personRecord.id]
|
Person: [personRecord.id]
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('created address:', address)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
@ -80,10 +78,9 @@ export default async function handler(req, res) {
|
||||||
})
|
})
|
||||||
.then(r => {
|
.then(r => {
|
||||||
res.json({ status: 'success' })
|
res.json({ status: 'success' })
|
||||||
console.log(r.statusText)
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error)
|
console.error(error)
|
||||||
res.json({ status: 'error', error })
|
res.json({ status: 'error', error })
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export default async function handler(req, res) {
|
||||||
})
|
})
|
||||||
.then(res => res.status(200).json({ success: true }))
|
.then(res => res.status(200).json({ success: true }))
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error)
|
console.error(error)
|
||||||
res.json({ status: 'Something went wrong', error })
|
res.json({ status: 'Something went wrong', error })
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ const valiadateAddress = async step => {
|
||||||
// Get the raw personal address input
|
// Get the raw personal address input
|
||||||
const userAddress = sessionStorage.getItem('bank-signup-userAddress')
|
const userAddress = sessionStorage.getItem('bank-signup-userAddress')
|
||||||
|
|
||||||
console.log(userAddress)
|
|
||||||
if (!userAddress) return
|
if (!userAddress) return
|
||||||
|
|
||||||
const result = await geocode(userAddress)
|
const result = await geocode(userAddress)
|
||||||
|
|
@ -62,7 +61,7 @@ export default function Apply() {
|
||||||
]
|
]
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log(`Form error: ${formError}`)
|
console.error(`Form error: ${formError}`)
|
||||||
if (!router.isReady) return
|
if (!router.isReady) return
|
||||||
setStep(parseInt(router.query.step))
|
setStep(parseInt(router.query.step))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,10 +115,11 @@ function Page({
|
||||||
]
|
]
|
||||||
|
|
||||||
// janky right now and does not show last image
|
// janky right now and does not show last image
|
||||||
console.log(
|
|
||||||
`White sheets of paper\nWaiting to be printed on\nA blank console waits`
|
|
||||||
)
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log(
|
||||||
|
`White sheets of paper\nWaiting to be printed on\nA blank console waits`
|
||||||
|
)
|
||||||
if (count === images.length - 1) {
|
if (count === images.length - 1) {
|
||||||
setCount(0)
|
setCount(0)
|
||||||
}
|
}
|
||||||
|
|
@ -152,11 +153,9 @@ function Page({
|
||||||
reveal={reveal}
|
reveal={reveal}
|
||||||
onMouseEnter={() => {
|
onMouseEnter={() => {
|
||||||
setHover(true)
|
setHover(true)
|
||||||
console.log('hover:', hover)
|
|
||||||
}}
|
}}
|
||||||
onMouseOut={() => {
|
onMouseOut={() => {
|
||||||
setHover(false)
|
setHover(false)
|
||||||
console.log('hover:', hover)
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Konami action={easterEgg}>
|
<Konami action={easterEgg}>
|
||||||
|
|
@ -361,7 +360,6 @@ function Page({
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCount(count + 1)
|
setCount(count + 1)
|
||||||
console.log(count)
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
|
@ -1136,7 +1134,6 @@ export async function getStaticProps() {
|
||||||
// Sprig: get newest games
|
// Sprig: get newest games
|
||||||
const { getGames } = require('./api/games')
|
const { getGames } = require('./api/games')
|
||||||
let game = await getGames()
|
let game = await getGames()
|
||||||
console.log(game)
|
|
||||||
|
|
||||||
let gameTitle = []
|
let gameTitle = []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue