Skip to content

Commit f460275

Browse files
nullable placeholder job (supabase#29694)
1 parent df40b59 commit f460275

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

apps/www/pages/careers.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import career from '~/data/career.json'
1919
export async function getStaticProps() {
2020
const job_res = await fetch('https://api.ashbyhq.com/posting-api/job-board/supabase')
2121
const job_data = await job_res.json()
22+
2223
const jobs = groupJobsByTeam(job_data.jobs.filter((job: JobItemProps) => !filterGenericJob(job)))
2324
const placeholderJob = job_data.jobs.find(filterGenericJob)
2425

@@ -75,7 +76,7 @@ export async function getStaticProps() {
7576
return {
7677
props: {
7778
jobs,
78-
placeholderJob,
79+
placeholderJob: placeholderJob ?? null,
7980
contributors: contributors,
8081
},
8182
}
@@ -463,9 +464,11 @@ const CareerPage: NextPage<CareersPageProps> = ({ jobs, placeholderJob, contribu
463464
</div>
464465
))}
465466
</div>
466-
<div className="pt-4 mt-4 border-t border-muted -space-y-px">
467-
{placeholderJob && <JobItem job={placeholderJob} />}
468-
</div>
467+
{placeholderJob && (
468+
<div className="pt-4 mt-4 border-t border-muted -space-y-px">
469+
<JobItem job={placeholderJob} />
470+
</div>
471+
)}
469472
</SectionContainer>
470473
</div>
471474
</DefaultLayout>

0 commit comments

Comments
 (0)