Skip to content

Commit

Permalink
fix: 경험카드 필터링 로직 수정 (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
newminkyung authored Oct 1, 2023
1 parent 52520c1 commit b2d6baa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/features/collection/utils/getFilteredExperiences.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Experience } from '../types';

const getFilteredExperiences = (experiences: Experience[], selectedCapability: string) =>
experiences.filter((experience) =>
const getFilteredExperiences = (experiences: Experience[], selectedCapability: string) => {
if (selectedCapability === '전체') return experiences;

return experiences.filter((experience) =>
experience.experienceCapabilityKeywords?.find((capability) => capability === selectedCapability)
);
};
export default getFilteredExperiences;

1 comment on commit b2d6baa

@vercel
Copy link

@vercel vercel bot commented on b2d6baa Oct 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.