Replace entire codebase with homarr-labs/homarr
This commit is contained in:
9
packages/icons/src/auto-icon-searcher.ts
Normal file
9
packages/icons/src/auto-icon-searcher.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { Database } from "@homarr/db";
|
||||
import { like } from "@homarr/db";
|
||||
import { icons } from "@homarr/db/schema";
|
||||
|
||||
export const getIconForName = (db: Database, name: string) => {
|
||||
return db.query.icons.findFirst({
|
||||
where: like(icons.name, `%${name}%`),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user