Skip to content

Commit

Permalink
🎨 renaming of lazy icon component
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-unterberg committed Dec 15, 2023
1 parent eca16ed commit d902a05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/common/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Suspense, lazy } from 'react'

import { ICON_ID } from '@/lib/icons/iconID'

const LazyIcon = lazy(() => import('@/lib/icons/LazyIcon'))
const IconLazyRenderer = lazy(() => import('@/lib/icons/IconLazyRenderer'))

interface AppIconProps extends LucideProps {
icon: ICON_ID
Expand All @@ -13,7 +13,7 @@ const Icon = ({ icon, ...props }: AppIconProps) => {
if (icon) {
return (
<Suspense>
<LazyIcon icon={icon} {...props} />
<IconLazyRenderer icon={icon} {...props} />
</Suspense>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface LazyIconIconProps extends LucideProps {
icon: ICON_ID
}

const LazyIcon = ({ icon, ...props }: LazyIconIconProps) => {
const IconLazyRenderer = ({ icon, ...props }: LazyIconIconProps) => {
const AppIconComponent = useMemo(() => APP_ICON[icon].component ?? null, [icon])

if (AppIconComponent) {
Expand All @@ -17,4 +17,4 @@ const LazyIcon = ({ icon, ...props }: LazyIconIconProps) => {
return null
}

export default LazyIcon
export default IconLazyRenderer

0 comments on commit d902a05

Please sign in to comment.