11'use client' ;
22
33import { Skeleton , Typography } from '@stackframe/stack-ui' ;
4- import { icons } from 'lucide-react' ;
4+ import { Contact , ShieldCheck , Bell , Monitor , Key , Settings , CirclePlus } from 'lucide-react' ;
55import React , { Suspense } from "react" ;
66import { useStackApp , useUser } from '..' ;
77import { MaybeFullPage } from "../components/elements/maybe-full-page" ;
@@ -17,8 +17,18 @@ import { SettingsPage } from './account-settings/settings/settings-page';
1717import { TeamCreationPage } from './account-settings/teams/team-creation-page' ;
1818import { TeamPage } from './account-settings/teams/team-page' ;
1919
20- const Icon = ( { name } : { name : keyof typeof icons } ) => {
21- const LucideIcon = icons [ name ] ;
20+ const iconMap = {
21+ Contact,
22+ ShieldCheck,
23+ Bell,
24+ Monitor,
25+ Key,
26+ Settings,
27+ CirclePlus
28+ } as const ;
29+
30+ const Icon = ( { name } : { name : keyof typeof iconMap } ) => {
31+ const LucideIcon = iconMap [ name ] ;
2232 return < LucideIcon className = "mr-2 h-4 w-4" /> ;
2333} ;
2434
@@ -31,7 +41,7 @@ export function AccountSettings(props: {
3141 } & ( {
3242 icon ?: React . ReactNode ,
3343 } | {
34- iconName ?: keyof typeof icons ,
44+ iconName ?: keyof typeof iconMap ,
3545 } ) ) [ ] ,
3646 mockUser ?: {
3747 displayName ?: string ,
@@ -140,7 +150,7 @@ export function AccountSettings(props: {
140150 type : 'item' ,
141151 id : item . id ,
142152 icon : ( ( ) => {
143- const iconName = ( item as any ) . iconName as keyof typeof icons | undefined ;
153+ const iconName = ( item as any ) . iconName as keyof typeof iconMap | undefined ;
144154 if ( iconName ) {
145155 return < Icon name = { iconName } /> ;
146156 } else if ( ( item as any ) . icon ) {
0 commit comments