Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
refactor(sidebar): dynamic load sortable menulist
Browse files Browse the repository at this point in the history
  • Loading branch information
mydearxym committed Aug 25, 2019
1 parent 87a617f commit df46ba0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/containers/Sidebar/MenuList.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import React from 'react'
import dynamic from 'next/dynamic'
import R from 'ramda'

import MenuBar from './MenuBar'
import NormalMenuList from './NormalMenuList'
import SortableMenuList from './SortableMenuList'
// import SortableMenuList from './SortableMenuList'

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

const DynamicSortableMenuList = dynamic({
loader: () => import('./SortableMenuList'),
/* eslint-disable */
loading: () => <div>..</div>,
/* eslint-enable */
})

const MenuList = ({
items,
pin,
Expand Down Expand Up @@ -38,7 +46,7 @@ const MenuList = ({
forceRerender={forceRerender}
/>
) : (
<SortableMenuList
<DynamicSortableMenuList
communities={sortableCommunities}
sortOptActive={sortOptActive}
pin={pin}
Expand Down

0 comments on commit df46ba0

Please sign in to comment.