Skip to content

Commit c4d0001

Browse files
authored
fix: FilterItem key warning (#1246)
1 parent 735d978 commit c4d0001

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/search-manager/FilterByBlockType.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ const ProblemFilterItem = ({ count, handleCheckboxChange } : ProblemFilterItemPr
100100
return (
101101
<div className="problem-menu-item">
102102
<MenuItem
103-
key={blockType}
104103
as={Form.Checkbox}
105104
value={blockType}
106105
onChange={handleCheckBoxChangeOnProblem}
@@ -194,7 +193,6 @@ const FilterItem = ({ blockType, count } : FilterItemProps) => {
194193

195194
return (
196195
<MenuItem
197-
key={blockType}
198196
as={Form.Checkbox}
199197
value={blockType}
200198
onChange={handleCheckboxChange}
@@ -278,7 +276,7 @@ const FilterByBlockType: React.FC<Record<never, never>> = () => {
278276
<Menu className="block-type-refinement-menu" style={{ boxShadow: 'none' }}>
279277
{
280278
Object.entries(sortedBlockTypes).map(([blockType, count]) => (
281-
<FilterItem blockType={blockType} count={count} />
279+
<FilterItem key={blockType} blockType={blockType} count={count} />
282280
))
283281
}
284282
{

0 commit comments

Comments
 (0)