Skip to content

Commit

Permalink
feat: put the local selector where the socket status currently is. An…
Browse files Browse the repository at this point in the history
…chor socket bottom left
  • Loading branch information
danielstefanequilobe committed Jan 19, 2022
1 parent 4777e4d commit 22f542a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
18 changes: 4 additions & 14 deletions src/components/blocks/LeftNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useDispatch } from 'react-redux';
import { toggleMode } from '../../store/actions/app';
import { FormattedMessage } from 'react-intl';
import { resetRefreshPrompt } from '../../store/actions/app';
import { LocaleSwitcher } from '../../components';

const Container = styled('div')`
display: flex;
Expand Down Expand Up @@ -63,7 +62,8 @@ const LeftNav = withTheme(({ children }) => {
onClick={() => {
dispatch(resetRefreshPrompt);
setLocation('projects');
}}>
}}
>
<FormattedMessage id="projects" />
</MenuItem>
<MenuItem
Expand All @@ -72,20 +72,10 @@ const LeftNav = withTheme(({ children }) => {
onClick={() => {
dispatch(resetRefreshPrompt);
setLocation('units');
}}>
}}
>
<FormattedMessage id="units" />
</MenuItem>

<hr style={{ borderColor: 'rgba(255,255,255,0.1)' }} />
<div
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}>
<LocaleSwitcher />
</div>
<hr style={{ borderColor: 'rgba(255,255,255,0.1)' }} />
</NavContainer>
{children}
</Container>
Expand Down
17 changes: 15 additions & 2 deletions src/components/layout/Dashboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
//import { useSelector } from 'react-redux';
import styled, { withTheme } from 'styled-components';
import { LeftNav } from '..';
import { LeftNav, LocaleSwitcher } from '..';

const Container = styled('div')`
width: 100%;
Expand Down Expand Up @@ -35,13 +35,26 @@ const Body = styled('div')`
padding: 0;
`;

const StyledLocalContainer = styled('div')`
width: 100%;
height: 100%;
display: flex;
justify-content: flex-end;
padding: 0rem 1.5rem 0rem 1.5rem;
box-sizing: border-box;
`;

const Dashboard = withTheme(({ children }) => {
//const appStore = useSelector(state => state.app);
return (
<Main>
<LeftNav />
<Container>
<Headline />
<Headline>
<StyledLocalContainer>
<LocaleSwitcher />
</StyledLocalContainer>
</Headline>
<Body>{children}</Body>
</Container>
</Main>
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/SocketStatusContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const SocketStatusCard = styled('div')`
align-items: center;
margin: 1.25rem;
width: 8.125rem;
top: 0;
right: 0;
bottom: 0;
left: 0;
`;

const StatusColor = styled('div')`
Expand Down

0 comments on commit 22f542a

Please sign in to comment.