diff --git a/components/Icon.tsx b/components/Icon.tsx index b179066..1830f0b 100644 --- a/components/Icon.tsx +++ b/components/Icon.tsx @@ -13,4 +13,6 @@ const Icon = forwardRef(({ icon, ...rest }, ref) => { } else return ; }); +Icon.displayName = "Icon"; + export default Icon; diff --git a/components/IconGrid.tsx b/components/IconGrid.tsx index edb2362..b6333a7 100644 --- a/components/IconGrid.tsx +++ b/components/IconGrid.tsx @@ -24,22 +24,26 @@ const IconGrid = ({ query, color, weight, iconName, setIconName }: Props) => { return fuse.search(query).map((result) => result.item); }, [query]); - return filteredQueryResultsSelector.map((icon) => { - const IconComponent = icon.Icon; - return ( -
setIconName(icon.pascal_name)} - className={`cursor-pointer btn p-1 box-border bg-base-100 border-none w-full ${ - icon.pascal_name === iconName - ? "outline outline-1 outline-primary" - : "" - }`} - > - -
- ); - }); + return ( + <> + {filteredQueryResultsSelector.map((icon) => { + const IconComponent = icon.Icon; + return ( +
setIconName(icon.pascal_name)} + className={`cursor-pointer btn p-1 box-border bg-base-100 border-none w-full ${ + icon.pascal_name === iconName + ? "outline outline-1 outline-primary" + : "" + }`} + > + +
+ ); + })} + + ); }; export default IconGrid;