24 lines
647 B
React
24 lines
647 B
React
|
import React from 'react';
|
||
|
import SidebarContent from './component';
|
||
|
import NewLayoutContext from '../layout/context/context';
|
||
|
|
||
|
const SidebarContentContainer = (props) => {
|
||
|
const { newLayoutContextState, newLayoutContextDispatch } = props;
|
||
|
const {
|
||
|
output, sidebarContentPanel,
|
||
|
} = newLayoutContextState;
|
||
|
const { sidebarContent } = output;
|
||
|
|
||
|
if (sidebarContent.display === false) return null;
|
||
|
|
||
|
return (
|
||
|
<SidebarContent
|
||
|
{...sidebarContent}
|
||
|
contextDispatch={newLayoutContextDispatch}
|
||
|
sidebarContentPanel={sidebarContentPanel}
|
||
|
/>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default NewLayoutContext.withConsumer(SidebarContentContainer);
|