Skip to content

Commit

Permalink
fix: added children/replaced leftNav w/dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
SPageot committed Dec 14, 2021
1 parent 65bae5a commit b90e646
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
9 changes: 6 additions & 3 deletions src/components/layout/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,19 @@ const Body = styled('div')`
height: 46.75rem;
margin: 1.5rem;
background-color: #ffffff;
overflow: hidden;
`;

const Dashboard = withTheme(() => {
const Dashboard = withTheme(({children}) => {
//const appStore = useSelector(state => state.app);
return (
<Main>
<LeftNav />
<LeftNav/>
<Container>
<Headline />
<Body />
<Body>
{children}
</Body>
</Container>
</Main>
);
Expand Down
8 changes: 4 additions & 4 deletions src/navigation/AppNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { BrowserRouter as Router, Route } from 'react-router-dom';
import { IndeterminateProgressOverlay, Dashboard } from '../components/';
import * as Pages from '../pages';

import { AppContainer, LeftNav } from '../components';
import { AppContainer } from '../components';

const AppNavigator = () => {
const { showProgressOverlay } = useSelector(store => store.app);
return (
<AppContainer>
{showProgressOverlay && <IndeterminateProgressOverlay />}
<Router>
<LeftNav>
<Dashboard>
<Suspense fallback={<IndeterminateProgressOverlay />}>
<Route exact path="/">
<Pages.Home />
Expand Down Expand Up @@ -45,8 +45,8 @@ const AppNavigator = () => {
<Pages.StoryBook />
</Route>
</Suspense>
</LeftNav>
<Dashboard />
</Dashboard>

</Router>

</AppContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demo/Projects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Projects = () => {
const dispatch = useDispatch();
const climateWarehouseStore = useSelector(store => store.climateWarehouse);

useEffect(() => dispatch(getProjects({ useMockedResponse: false })), []);
useEffect(() => dispatch(getProjects({ useMockedResponse: true })), []);
return (
<>
<Card>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demo/Units/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Units = () => {
const dispatch = useDispatch();
const climateWarehouseStore = useSelector(store => store.climateWarehouse);

useEffect(() => dispatch(getUnits({ useMockedResponse: false })), []);
useEffect(() => dispatch(getUnits({ useMockedResponse: true })), []);

return (
<>
Expand Down

0 comments on commit b90e646

Please sign in to comment.