Skip to content

Commit

Permalink
Fix/#44: 체크박스 해제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Minn-Choi committed Jan 15, 2025
1 parent 678f85e commit 65e20fc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/common/banner/ToolListBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ const ToolListBanner = () => {
const { selectedCategory, selectedTool, isFreeChecked } = toolState;

const clearSelectedTool = () => {
setToolState((prev) => ({ ...prev, selectedTool: null }));
setToolState((prev) => ({
...prev,
selectedTool: null,
isFreeChecked: false,
selectedCategory: prev.selectedCategory === '자유' ? null : prev.selectedCategory,
}));
};

const handleCategoryClick = (category: string) => {
Expand Down Expand Up @@ -113,8 +118,8 @@ const ToolListBanner = () => {
<IcInstaGray20 width={20} height={20} />
) : (
<Chip.Icon
src={tools.find((tool) => tool.toolName === selectedTool)?.toolLogo || '/svgs/default_logo.svg'}
alt="Custom Icon"
src={tools.find((tool) => tool.toolName === selectedTool)?.toolLogo || '/svgs/'}
alt="logo"
width={2}
height={2}
/>
Expand Down

0 comments on commit 65e20fc

Please sign in to comment.