2021-12-03 20:37:38 +01:00
|
|
|
import React from 'react';
|
2021-12-03 21:33:46 +01:00
|
|
|
import {
|
|
|
|
Navbar,
|
|
|
|
RequestTabs,
|
|
|
|
Sidebar
|
|
|
|
} from '@grafnode/components';
|
2021-12-03 20:37:38 +01:00
|
|
|
import actions from 'providers/Store/actions';
|
|
|
|
import { useStore } from 'providers/Store';
|
|
|
|
import StyledWrapper from './StyledWrapper';
|
|
|
|
|
|
|
|
export default function Main() {
|
|
|
|
const [state, dispatch] = useStore();
|
|
|
|
|
|
|
|
const {
|
|
|
|
collections,
|
2021-12-03 21:33:46 +01:00
|
|
|
requestTabs,
|
2021-12-03 20:37:38 +01:00
|
|
|
activeRequestTabId
|
|
|
|
} = state;
|
|
|
|
|
|
|
|
console.log(actions);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Navbar />
|
|
|
|
<StyledWrapper>
|
|
|
|
<Sidebar
|
|
|
|
collections={collections}
|
|
|
|
actions={actions}
|
|
|
|
dispatch={dispatch}
|
|
|
|
activeRequestTabId={activeRequestTabId}
|
|
|
|
/>
|
|
|
|
<section className='mt-4 flex flex-grow flex-col'>
|
2021-12-03 21:33:46 +01:00
|
|
|
<RequestTabs
|
|
|
|
requestTabs={requestTabs}
|
|
|
|
actions={actions}
|
|
|
|
dispatch={dispatch}
|
|
|
|
activeRequestTabId={activeRequestTabId}
|
|
|
|
/>
|
2021-12-03 20:37:38 +01:00
|
|
|
</section>
|
|
|
|
</StyledWrapper>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|