From 96f6d86f378b7fba5d0bc6c08482df839e5b8d87 Mon Sep 17 00:00:00 2001 From: Max Omdal Date: Sun, 3 Dec 2023 10:04:12 -0800 Subject: [PATCH] Fix linting error with type --- common/iconComponentMap.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/iconComponentMap.ts b/common/iconComponentMap.ts index 92625770..1ef3495c 100644 --- a/common/iconComponentMap.ts +++ b/common/iconComponentMap.ts @@ -2,6 +2,7 @@ import meetup from '@/public/icon/meetup.svg'; import present from '@/public/icon/present.svg'; import defaultIcon from '@/public/icon/default.svg'; import at_symbol from '@/public/icon/at_symbol.svg'; +import { StaticImport } from 'next/dist/shared/lib/get-img-props'; const iconComponentMap: Map = new Map([ ['meetup', meetup], @@ -9,6 +10,6 @@ const iconComponentMap: Map = new Map([ ['at_symbol', at_symbol], ]); -export function getIconComponent(iconName: string): JSX.Element { +export function getIconComponent(iconName: string): StaticImport { return iconComponentMap.get(iconName) ?? defaultIcon; } \ No newline at end of file