Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit b41876c

Browse files
committed
refactor: update JobCard and JobsPage to handle job location and remote status more effectively
1 parent ccde737 commit b41876c

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

apps/jobboard-frontend/src/modules/jobs/components/jobs/JobCard.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ export function JobCard({ job }: JobCardProps) {
4242
return t(`jobs.tags.tags.${key ?? tag}`, tag);
4343
});
4444
const jobTypes = job.type.map((type) => t(jobTypeLabelKeyMap[type] ?? type));
45-
const location =
46-
job.location.toLowerCase() === 'remote' ? t('jobs.card.remote') : job.location;
4745

4846
return (
4947
<Card
@@ -121,7 +119,7 @@ export function JobCard({ job }: JobCardProps) {
121119
</span>
122120
<span className="flex items-center gap-1">
123121
<MapPin className="size-4 text-primary" aria-hidden />
124-
{location}
122+
{job.remote ? t('jobs.card.remote') : job.workplace.location}
125123
</span>
126124
</div>
127125
</div>

apps/jobboard-frontend/src/modules/jobs/pages/JobsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function convertJobPostToJob(jobPost: JobPostResponse): Job {
4848
ethicalTags: [],
4949
ethicalAverages: {},
5050
},
51-
location: jobPost.remote ? 'Remote' : jobPost.location,
51+
remote: jobPost.remote,
5252
type,
5353
minSalary: Math.floor(jobPost.minSalary / 1000), // Convert to 'k' format
5454
maxSalary: Math.floor(jobPost.maxSalary / 1000),

apps/jobboard-frontend/src/modules/shared/types/job.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export type Job = {
8484
title: string;
8585
description?: string;
8686
workplace: WorkplaceBriefResponse;
87-
location: string;
87+
remote: boolean;
8888
type: JobType[];
8989
minSalary: number;
9090
maxSalary: number;

0 commit comments

Comments
 (0)