Skip to content

Commit

Permalink
Merge pull request #4 from Toy2-Team3/KAN-13--feature/layout/login
Browse files Browse the repository at this point in the history
로그인 및 회원가입 레이아웃을 구현한다.
  • Loading branch information
JSH99 authored Nov 9, 2023
2 parents d438ca0 + 25486b3 commit 7a45af2
Show file tree
Hide file tree
Showing 12 changed files with 948 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"singleQuote": true,
"singleQuote": false,
"semi": true,
"useTabs": false,
"tabWidth": 2,
Expand Down
131 changes: 128 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"react": "^18.2.0",
"react-datepicker": "^4.21.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.18.0",
"react-scripts": "5.0.1",
"recoil": "^0.7.7",
"styled-components": "^6.1.0",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
Expand All @@ -20,6 +22,7 @@
"eject": "react-scripts eject"
},
"devDependencies": {
"@types/react-datepicker": "^4.19.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.48.0",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="toy2 team3" />
<title>Toy2 Team3</title>
<title>SWEETY | make youre life sweet</title>
</head>
<body>
<div id="root"></div>
Expand Down
56 changes: 37 additions & 19 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,61 @@
import './App.css';
import { ThemeProvider } from 'styled-components';
import theme from '../src/styles/theme';
import "./App.css";
import { ThemeProvider } from "styled-components";
import theme from "../src/styles/theme";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import NavigationBar from './components/NavigationBar';
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';
import NavigationBar from "./components/NavigationBar";
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";
import StartPage from "./components/login/StartPage";
import SignUpSpecific from "./components/login/SignUpSpecific";
import Login from "./components/login/Login";
import SignUpIDPW from "./components/login/SignUpIDPW";
import { useRecoilState } from "recoil";
import { loginState } from "./recoil/atoms";

function App() {
return (
const [login] = useRecoilState(loginState);
return login ? (
<ThemeProvider theme={theme}>
<BrowserRouter>
<div className="App" style={{display: 'flex'}}>
<div className="App" style={{ display: "flex" }}>
<NavigationBar></NavigationBar>
<PageWrap>
<Routes>
<Route path="/" element={<HomePage/>} />
<Route path="/community" element={<CommunityPage/>} />
<Route path="/chat" element={<ChatPage/>} />
<Route path="/mypage" element={<MyPage/>} />
<Route path="/" element={<HomePage />} />
<Route path="/community" element={<CommunityPage />} />
<Route path="/chat" element={<ChatPage />} />
<Route path="/mypage" element={<MyPage />} />
</Routes>
</PageWrap>
</div>
</BrowserRouter>
</BrowserRouter>
</ThemeProvider>
) : (
<ThemeProvider theme={theme}>
<BrowserRouter>
<Routes>
<Route path="/startPage" element={<StartPage />} />
<Route path="/signup1" element={<SignUpIDPW />} />
<Route path="/signup2" element={<SignUpSpecific theme={theme} />} />
<Route path="/login" element={<Login />} />
</Routes>
</BrowserRouter>
</ThemeProvider>
);
}

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

0 comments on commit 7a45af2

Please sign in to comment.