Skip to content

Commit

Permalink
Merge branch 'main' into kmj/userMy
Browse files Browse the repository at this point in the history
  • Loading branch information
miinjoo authored Aug 26, 2022
2 parents e062bc3 + 98ead37 commit 5c39ec6
Show file tree
Hide file tree
Showing 16 changed files with 814 additions and 9 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</tr>
<tr width="100%">
<td align="center"><img src = "" width="80%"/></td>
<td align="center"><img src = "" width="80%"/></td>
<td align="center"><img src = "https://ifh.cc/g/Vo4n9y.png" width="100px" /></td>
<td align="center"><img src = "" width="80%"/></td>
<td align="center"><img src = "" width="80%"/></td>
<td align="center"><img src = "" width="80%"/></td>
Expand All @@ -32,17 +32,16 @@
<td align="center">메인페이지 / 카테고리 페이지</td>
<td align="center">미정</td>
<td align="center">마이페이지(유저/관리자)</td>
<td align="center">부스 상세 페이지</td>
<td align="center">미정</td>
<td align="center">미정</td>
<td align="center">미정</td>
<td align="center">미정</td>
</tr>
</table>

## 🎉 기술 스택

- Frontend : <img src="https://img.shields.io/badge/React-61DAFB?style=flat-square&logo=React&logoColor=white">
- Frontend : <img src="https://img.shields.io/badge/React-61DAFB?style=flat-square&logo=React&logoColor=white"> <img src="https://img.shields.io/badge/Redux-764ABC?style=flat-square&logo=Redux&logoColor=white"> <img src="https://img.shields.io/badge/ReduxToolkit-764ABC?style=flat-square&logo=Redux&logoColor=white"> <img src="https://img.shields.io/badge/ReduxPersist-764ABC?style=flat-square&logo=Redux&logoColor=white"> <img src="https://img.shields.io/badge/styled_components-DB7093?style=flat-square&logo=styled-components&logoColor=white">
- Package Manager : <img src="https://img.shields.io/badge/npm-CB3837?style=flat-square&logo=npm&logoColor=white">
- Code Formmater : <img src="https://img.shields.io/badge/Prettier-F7B93E?style=flat-square&logo=React&logoColor=white">
- ETC : 미정
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^1.8.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"gulp-sass": "5.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"sass": "^1.54.5",
"redux": "^4.2.0",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.1",
"sass": "^1.54.4",
"styled-components": "^5.3.5",
"web-vitals": "^2.1.4"
},
Expand Down
21 changes: 21 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ import { BrowserRouter, Routes, Route } from "react-router-dom";
import MainPage from "./pages/mainpage/MainPage";
// 부스
import Category from "./pages/boothpage/Category";

// 마이페이지
import MyUser from "./pages/mypage/MyUser";
import MyManager from "./pages/mypage/MyManager";

//테스트
import ReduxTest from "./pages/reduxTest";
// 디테일
import BoothDetailPage from "./pages/boothdetailpage/BoothDetailPage";
// 수정페이지
import EditBoothPage from "./pages/editboothpage/EditBoothPage";
import EditMenuPage from "./pages/editmenupage/EditMenuPage";


function App() {
return (
<BrowserRouter>
Expand All @@ -16,9 +26,20 @@ function App() {
<Route exact path="/" element={<MainPage />} />
{/* 부스 */}
<Route exact path="/category" element={<Category />} />

{/* 마이페이지 */}
<Route exact path="/mypage_user" element={<MyUser />} />
<Route exact path="/mypage_manager" element={<MyManager />} />

{/* 로그인 테스트 */}
<Route exact path="/test" element={<ReduxTest />} />
{/* 디테일 */}

<Route exact path="/category/detail" element={<BoothDetailPage />} />
{/* 수정 */}
<Route exact path="/editbooth" element={<EditBoothPage />} />
<Route exact path="/editmenu" element={<EditMenuPage />} />

</Routes>
</BrowserRouter>
);
Expand Down
15 changes: 15 additions & 0 deletions src/_mock/boothComment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const boothComment = [
{
id: 1,
nickname: "닉네임1",
created_at: "8/23 13:57",
content: "맛있는데 가격이 너무 비싸요ㅜㅜㅜㅜ",
},
{
id: 2,
nickname: "닉네임2",
created_at: "8/23 20:46",
content:
"너무 맛있었어요!! 내년에 또 해주세요~~ \n 댓글이 두줄일때 어쩌구저쩌구",
},
];
22 changes: 22 additions & 0 deletions src/_mock/boothMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const boothMenu = [
{
id: 1,
name: "메뉴 이름1",
price: 1000,
},
{
id: 2,
name: "메뉴 이름2",
price: 2000,
},
{
id: 3,
name: "메뉴 이름3",
price: 3000,
},
{
id: 4,
name: "메뉴 이름4",
price: 4000,
},
];
47 changes: 47 additions & 0 deletions src/components/BoothDetail/PartTitle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import styled from "styled-components";
import star from "../../images/stars/star3.svg";
import { PyeongChang_Peace } from "../../components/Text";

const PartTitle = ({ title }) => {
return (
<>
<PartTitleContainer>
<PartTitleTextContainer>
<Star src={star} />
<PyeongChang_Peace size="16px" weight="300" color="var(--green3)">
{title}
</PyeongChang_Peace>
</PartTitleTextContainer>
<Border />
</PartTitleContainer>
</>
);
};

export default PartTitle;

const PartTitleContainer = styled.div`
width: 100%;
height: 55px;
padding: 0 20px;
margin-top: 10px;
`;

const PartTitleTextContainer = styled.div`
display: flex;
align-items: center;
margin-top: 30px;
`;

const Star = styled.img`
width: 18px;
height: 30px;
margin-right: 10px;
`;

const Border = styled.div`
border-bottom: 1px solid var(--gray);
width: 100%;
height: 0;
margin-top: 7px;
`;
62 changes: 62 additions & 0 deletions src/components/TitleBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import React from "react";
import styled from "styled-components";

// import font
import { PyeongChang_Peace } from "../components/Text";

// import image
import { ReactComponent as Backbutton } from "../images/navbar/back.svg";

const TitleBar = ({ children }) => {
return (
<>
<Background>
<TopBar>
<ButtonWrapper>
<Backbutton></Backbutton>
</ButtonWrapper>
<TextWrapper>
<PyeongChang_Peace weight="700" size="22px">
{children}
</PyeongChang_Peace>
</TextWrapper>
</TopBar>
</Background>
<hr
style={{ marginTop: "16px", backgroundColor: "#EAEAEA", width: "100%" }}
/>
</>
);
};

export default TitleBar;

const TopBar = styled.div`
display: flex;
width: 100%;
`;

const ButtonWrapper = styled.div`
/* position: absolute;
z-index: 100; */
display: flex;
align-items: center;
margin-left: 16px;
`;

const TextWrapper = styled.div`
display: inline;
width: fit-content;
margin: 0 auto;
padding-right: 16px;
`;

const Background = styled.div`
position: relative;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 47px;
width: 100%;
`;
3 changes: 3 additions & 0 deletions src/images/notice.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 15 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ import App from "./App";
import "./styles/Static.css";
import "./styles/common.scss";

import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import { persistStore } from "redux-persist";

import { store } from "./redux/store";

export let persistor = persistStore(store);

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<React.StrictMode>
<App />
</React.StrictMode>
</PersistGate>
</Provider>,
);
Loading

0 comments on commit 5c39ec6

Please sign in to comment.