Skip to content

Commit 7dcc974

Browse files
committed
Fix importing..?
1 parent 5894aad commit 7dcc974

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import * as React from "react";
22
import { Folder } from "./Folder";
33

4-
export default async (folder: Folder, name: string): Promise<JSX.Element> => {
5-
const module = await import(`./${folder}/index.esm.js`);
4+
export const IconByString = async (
5+
folder: Folder,
6+
name: string,
7+
): Promise<JSX.Element> => {
8+
const module = await import(`./../../${folder}/index.esm.js`);
69
const icon = module[name];
710

8-
if (typeof icon === "function") return icon;
11+
if (typeof icon === "function") return icon();
912
return <></>;
1013
};

0 commit comments

Comments
 (0)