Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commitdf46ba0

Browse files
committed
refactor(sidebar): dynamic load sortable menulist
1 parent87a617f commitdf46ba0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎src/containers/Sidebar/MenuList.js‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
importReactfrom'react'
2+
importdynamicfrom'next/dynamic'
23
importRfrom'ramda'
34

45
importMenuBarfrom'./MenuBar'
56
importNormalMenuListfrom'./NormalMenuList'
6-
importSortableMenuListfrom'./SortableMenuList'
7+
//import SortableMenuList from './SortableMenuList'
78

89
import{Wrapper}from'./styles/menu_list'
910
import{onSortMenuEnd}from'./logic'
1011

12+
constDynamicSortableMenuList=dynamic({
13+
loader:()=>import('./SortableMenuList'),
14+
/* eslint-disable */
15+
loading:()=><div>..</div>,
16+
/* eslint-enable */
17+
})
18+
1119
constMenuList=({
1220
items,
1321
pin,
@@ -38,7 +46,7 @@ const MenuList = ({
3846
forceRerender={forceRerender}
3947
/>
4048
) :(
41-
<SortableMenuList
49+
<DynamicSortableMenuList
4250
communities={sortableCommunities}
4351
sortOptActive={sortOptActive}
4452
pin={pin}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp