chore: disable challenges temporarily

This commit is contained in:
jinhojang6 2023-12-07 22:29:56 +09:00
parent 91f8e757ca
commit a66d003f93

View File

@ -113,28 +113,28 @@ export async function getStaticProps({ params }: any) {
let jobs: any = []
let issues = {}
const site = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'
// const site = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'
try {
if (Object.keys(JOB_BOARD_MAPPING).includes(bu)) {
jobs = await getJobs([bu], '')
}
if (bu === 'waku') {
const res = await fetch(`${site}/api/challenges`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify([{ owner: 'waku-org', repo: 'bounties' }]),
})
// if (bu === 'waku') {
// const res = await fetch(`${site}/api/challenges`, {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// },
// body: JSON.stringify([{ owner: 'waku-org', repo: 'bounties' }]),
// })
if (!res.ok) {
throw new Error(`Failed to fetch issues, status: ${res.status}`)
}
// if (!res.ok) {
// throw new Error(`Failed to fetch issues, status: ${res.status}`)
// }
issues = await res.json()
}
// issues = await res.json()
// }
return {
props: {