mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 16:07:41 +01:00
* bump package * Add Logo * remove console * prettify it * add favicons and fix issue * Add categorie page * add drag and drop * Make drag and drop working * Add drag options * Add modal * small styling fixes * fix search * Add code editor * Add more styling * Add more categories * create context provider * refactor eslint thing * update chakra-ui * improve, category bar * Add sortly * Add categories * Try to fix new categories * Fix Categories * Add docs Menu Tree data * Start with sectiontitles * Create link list * Add Docs menu to mobile * Add some more pages and text * Optimize text * add license to the menu * update packages * Fix build * Update title * Remove ModifiedTooltip * Fix assets * add yarn to copy-assets command * install deps * update * try something * new categories page * try something * Add icons reorder * add new icons page * add category view button * add categories * Fix vercel build * Add sidebar and costumize button * fix merge conlfict * Remove console.logs * add sidebar * Add icon overview * Fix key render issue * Fix types * Fix category render * Fix build * update lockfile * Added category icon and icon count in list. Moved scrollbar to the left to make it less intrusive --------- Co-authored-by: Eric Fennis <eric.fennis@endurance.com> Co-authored-by: Eric Fennis <eric@dreamteam.nl> Co-authored-by: Karsa <karsa@karsa.org>
24 lines
782 B
TypeScript
24 lines
782 B
TypeScript
import NextCache from './nextCache';
|
|
import {getAllData, GetDataOptions} from './icons';
|
|
|
|
export type IconNode = [string, object, IconNode[]];
|
|
export type IconNodes = {[iconName: string]: IconNode};
|
|
|
|
export function fetchIconNodes(writeCache = true, options?: GetDataOptions): Promise<IconNodes> {
|
|
if (options?.withChildKeys) {
|
|
return NextCache.resolve('api-icon-nodes-with-keys', async () => {
|
|
return (await getAllData({ withChildKeys : true})).reduce((acc, icon) => {
|
|
acc[icon.name] = icon.iconNode
|
|
return acc;
|
|
}, {});
|
|
}, writeCache);
|
|
}
|
|
|
|
return NextCache.resolve('api-icon-nodes', async () => {
|
|
return (await getAllData()).reduce((acc, icon) => {
|
|
acc[icon.name] = icon.iconNode
|
|
return acc;
|
|
}, {});
|
|
}, writeCache);
|
|
}
|