Skip to content

Commit

Permalink
Merge pull request #2 from Toy2-Team3/KAN-20--feature/layout/navigati…
Browse files Browse the repository at this point in the history
…on-bar

네비게이션 바 스타일 오류를 수정한다.
  • Loading branch information
dabin-Hailey authored Nov 8, 2023
2 parents a46bc84 + 3278a80 commit d438ca0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
29 changes: 23 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,40 @@ import HomePage from './pages/HomePage';
import CommunityPage from './pages/CommunityPage';
import ChatPage from './pages/chatting/index';
import MyPage from './pages/MyPage';
import styled from 'styled-components';

function App() {
return (
<ThemeProvider theme={theme}>
<BrowserRouter>
<div className="App" style={{display: 'flex'}}>
<NavigationBar></NavigationBar>
<Routes>
<Route path="/" element={<HomePage/>} />
<Route path="/community" element={<CommunityPage/>} />
<Route path="/chat" element={<ChatPage/>} />
<Route path="/mypage" element={<MyPage/>} />
</Routes>
<PageWrap>
<Routes>
<Route path="/" element={<HomePage/>} />
<Route path="/community" element={<CommunityPage/>} />
<Route path="/chat" element={<ChatPage/>} />
<Route path="/mypage" element={<MyPage/>} />
</Routes>
</PageWrap>
</div>
</BrowserRouter>
</ThemeProvider>
);
}

const PageWrap = styled.div`
flex: 1;
margin-left: 300px;
${props => props.theme.response.tablet} {
margin-left: 100px;
}
${props => props.theme.response.mobile} {
margin-left: 0;
margin-bottom: 120px;
}
`;

export default App;
4 changes: 3 additions & 1 deletion src/components/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,14 @@ export default function NavigationBar() {
const NavigationWrap = styled.div`
border-right: 1px solid ${props => props.theme.color.borderGray};
background: ${props => props.theme.color.white};
position: fixed;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
width: 300px;
height: 100vh;
z-index: 9999;
${props => props.theme.response.tablet} {
width: 100px;
Expand All @@ -194,7 +196,7 @@ const NavigationWrap = styled.div`
border-right: none;
width: 100%;
height: auto;
position: absolute;
position: fixed;
bottom: 0;
}
`;
Expand Down

0 comments on commit d438ca0

Please sign in to comment.