Skip to content

Commit

Permalink
fix: FilterItem key warning (#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido authored Sep 4, 2024
1 parent 735d978 commit c4d0001
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/search-manager/FilterByBlockType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const ProblemFilterItem = ({ count, handleCheckboxChange } : ProblemFilterItemPr
return (
<div className="problem-menu-item">
<MenuItem
key={blockType}
as={Form.Checkbox}
value={blockType}
onChange={handleCheckBoxChangeOnProblem}
Expand Down Expand Up @@ -194,7 +193,6 @@ const FilterItem = ({ blockType, count } : FilterItemProps) => {

return (
<MenuItem
key={blockType}
as={Form.Checkbox}
value={blockType}
onChange={handleCheckboxChange}
Expand Down Expand Up @@ -278,7 +276,7 @@ const FilterByBlockType: React.FC<Record<never, never>> = () => {
<Menu className="block-type-refinement-menu" style={{ boxShadow: 'none' }}>
{
Object.entries(sortedBlockTypes).map(([blockType, count]) => (
<FilterItem blockType={blockType} count={count} />
<FilterItem key={blockType} blockType={blockType} count={count} />
))
}
{
Expand Down

0 comments on commit c4d0001

Please sign in to comment.