Skip to content

Commit

Permalink
Fix linting error with type
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Omdal authored and Max Omdal committed Dec 3, 2023
1 parent 8c77837 commit 96f6d86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/iconComponentMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ 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<string, JSX.Element> = new Map([
['meetup', meetup],
['present', present],
['at_symbol', at_symbol],
]);

export function getIconComponent(iconName: string): JSX.Element {
export function getIconComponent(iconName: string): StaticImport {
return iconComponentMap.get(iconName) ?? defaultIcon;
}

0 comments on commit 96f6d86

Please sign in to comment.