mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
<!-- ccr-slack-attribution --> _Requested by **Dasha Nikolov, Ivan Vasilov** · [Slack thread](https://supabase.slack.com/archives/C0161K73J1J/p1785158372513869?thread_ts=1785158372.513869&cid=C0161K73J1J)_ **Before:** the careers page lists open roles under one heading per individual team (Auth, Data API, Functions, Realtime, Storage, ...). **After:** roles are grouped under their top-level department heading (Engineering, Design, ...), collapsing the per-team split. ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Feature / enhancement to the marketing site (`apps/www`) careers page. ## What is the current behavior? Open positions on the careers page are grouped by individual team, producing one `<h3>` heading per team (Auth, Data API, Functions, Realtime, Storage, ...). This fragments the list into many small groups. ## What is the new behavior? Roles are grouped under their top-level department heading (Engineering, Design, ...), so related teams are collapsed under a single department section. **How:** added a `department: string` field to `JobItemProps` and group on `job.department` (from the Ashby public job-board API, which returns both `department` and `team` as top-level strings per posting) instead of `job.team`. `groupJobsByTeam` is replaced by `groupJobsByDepartment` (it had no other callers), `getServerSideProps` now calls it, and the render loop was updated to key on and display the department heading. All styling, keys, and job rendering are unchanged. ## Additional context A Vercel preview deploy will show the result on the careers page. --- _Generated by [Claude Code](https://claude.ai/code/session_01GEvKydFSLsHhpBbNJ2PEzg)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
27 lines
666 B
TypeScript
27 lines
666 B
TypeScript
export interface JobItemProps {
|
|
id: string
|
|
title: string
|
|
location: any
|
|
department: string
|
|
team: string
|
|
employment: string
|
|
descriptionHtml: string
|
|
jobUrl: string
|
|
}
|
|
|
|
export const PLACEHOLDER_JOB_ID = '64d76968-1fe1-458c-8c6d-8859168c3fb7'
|
|
export const filterGenericJob = (job: JobItemProps) => job.id === PLACEHOLDER_JOB_ID
|
|
export const groupJobsByDepartment = (jobs: JobItemProps[]) => {
|
|
return jobs.reduce(
|
|
(acc, job) => {
|
|
const department = job.department || 'Other'
|
|
if (!acc[department]) {
|
|
acc[department] = []
|
|
}
|
|
acc[department].push(job)
|
|
return acc
|
|
},
|
|
{} as Record<string, JobItemProps[]>
|
|
)
|
|
}
|