Skip to content

Commit

Permalink
feat: 검색 자동완성 리스트에 ref 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Leejin-Yang committed Aug 14, 2023
1 parent 599a1f9 commit 001b266
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions frontend/src/components/Search/RecommendList/RecommendList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,18 @@ const RecommendList = ({ searchQuery }: RecommendListProps) => {
}

return (
<RecommendListContainer>
{products.map(({ id, name, categoryType }) => (
<li key={id}>
<Link as={RouterLink} to={`${PATH.PRODUCT_LIST}/${categoryType}/${id}`} block>
<MarkedText text={name} mark={searchQuery} />
</Link>
</li>
))}
</RecommendListContainer>
<>
<RecommendListContainer>
{products.map(({ id, name, categoryType }) => (
<li key={id}>
<Link as={RouterLink} to={`${PATH.PRODUCT_LIST}/${categoryType}/${id}`} block>
<MarkedText text={name} mark={searchQuery} />
</Link>
</li>
))}
</RecommendListContainer>
<div ref={scrollRef} aria-hidden />
</>
);
};

Expand Down

0 comments on commit 001b266

Please sign in to comment.