Skip to content

Commit b69f9cf

Browse files
committed
fix: lazy load Feed component to optimize performance
1 parent 3d14638 commit b69f9cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/Layout/AppContentLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { useState } from 'react'
2-
import { Feed } from 'src/features/feed'
32
import { DesktopBreakpoint } from 'src/providers/DesktopBreakpoint'
43
import { MobileBreakpoint } from 'src/providers/MobileBreakpoint'
54
import { useUserPreferences } from 'src/stores/preferences'
5+
import { lazyImport } from 'src/utils/lazyImport'
66
import { BottomNavigation } from '../Elements'
77
import { DesktopCards } from './DesktopCards'
88
import { MobileCards } from './MobileCards'
99
import { ScrollCardsNavigator } from './ScrollCardsNavigator'
10+
const { Feed } = lazyImport(() => import('src/features/feed'), 'Feed')
1011

1112
export const AppContentLayout = () => {
1213
const { cards, userCustomCards, layout } = useUserPreferences()
@@ -32,7 +33,6 @@ export const AppContentLayout = () => {
3233
</>
3334
)}
3435
</main>
35-
3636
</>
3737
)
3838
}

0 commit comments

Comments
 (0)