Skip to content

Commit

Permalink
remove object.value when mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
anemne committed Sep 11, 2024
1 parent 57fc611 commit f918544
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/compensations/Compensations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ const Compensations = ({ compensations, locations }: CompensationsProps) => {
);
};

const locationOptions: IOption[] = Object.values(locations).map(
(companyLocation) => ({
id: companyLocation._id,
label: companyLocation.companyLocationName,
}),
);
const locationOptions: IOption[] = locations.map((companyLocation) => ({
id: companyLocation._id,
label: companyLocation.companyLocationName,
}));

return (
<div className={styles.wrapper}>
Expand Down

0 comments on commit f918544

Please sign in to comment.