Skip to content

Commit

Permalink
hotfix: #391 분석 아이템이 없을시 해당 컴포넌트 없애는 조건 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sean2337 authored and leeminhee119 committed Sep 13, 2024
1 parent e708f00 commit 3521c73
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/web/src/component/home/SummaryInsightBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type SummaryInsightBoxProps = {

export function SummaryInsightBox({ type, insightArr }: SummaryInsightBoxProps) {
const transformPoints = transformPointsFun(insightArr);

if (transformPoints.length === 0) return;
return (
<div
css={css`
Expand All @@ -43,9 +43,11 @@ export function SummaryInsightBox({ type, insightArr }: SummaryInsightBoxProps)
gap: 1rem;
`}
>
{transformPoints.map((point, idx) => (
<InsightBox key={idx} type={type} insight={point} />
))}
{transformPoints
.filter((v) => v.point != null)
.map((point, idx) => (
<InsightBox key={idx} type={type} insight={point} />
))}
</div>
</div>
);
Expand Down

0 comments on commit 3521c73

Please sign in to comment.