From 40bb3e6fae4954e264929eae16cafc7edd50f6c3 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Wed, 4 Sep 2024 22:29:54 -0400 Subject: [PATCH] fix build error --- components/Icon.tsx | 2 ++ components/IconGrid.tsx | 36 ++++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) 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;