Skip to content

Commit

Permalink
Merge pull request #83 from hhhhyelim/test
Browse files Browse the repository at this point in the history
Feat: 이용약관 추가
  • Loading branch information
1223v authored Nov 23, 2023
2 parents 7b83785 + ed9963c commit f58016b
Show file tree
Hide file tree
Showing 22 changed files with 1,188 additions and 43 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@testing-library/user-event": "^13.5.0",
"@tosspayments/payment-widget-sdk": "^0.10.0",
"axios": "^1.6.2",
"moment": "^2.29.4",
"nanoid": "^5.0.3",
"react": "^18.2.0",
"react-cookie": "^6.1.1",
Expand Down
6 changes: 3 additions & 3 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@media only screen and (max-width: 400px) {
.App {
max-width: 390px;
height: 94vh;
/* height: 94vh; */
background-color: white;
padding-top: 3.5rem;
}
Expand All @@ -34,7 +34,7 @@
@media only screen and (min-width: 400px) and (max-width: 800px) {
.App {
max-width: 430px;
height: 94vh;
/* height: 94vh; */
background-color: white;
padding-top: 3.5rem;
}
Expand All @@ -56,7 +56,7 @@
@media (min-width: 800px) {
.App {
width: 600px;
height: 94vh;
/* height: 94vh; */
background-color: white;
padding-top: 3.5rem;
box-shadow: rgba(0, 0, 0, 0.15) 0px 8px 36px;
Expand Down
47 changes: 47 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import CouponPage from "./pages/MyPage/CouponPage/CouponPage";
import EventingPage from "./pages/MyPage/EventingPage/EventingPage";
import MyprofilePage from "./pages/MyPage/MyprofilePage/MyprofilePage";
import PolicyPage from "./pages/MyPage/PolicyPage/PolicyPage";
import PositionpolicyPage from "./pages/MyPage/PolicyPage/PositionpolicyPage";
import PrivacyPolicy from "./pages/MyPage/PolicyPage/PrivacypolicyPage";
import TermsOfUse from "./pages/MyPage/PolicyPage/TermsofusePage";
import ThirdpartyPage from "./pages/MyPage/PolicyPage/ThirdpartyPage";
Expand All @@ -25,6 +26,13 @@ import PaymentSuccessPage from "./pages/PaymentPage/Redirect/PaymentSuccessPage"
import ReadyPage from "./pages/ReadyPage/ReadyPage";

function App() {
// const navigate = useNavigate();
// // const [isLoggedIn, setisLoggedIn] = useRecoilState(isAuthenticatedState); // 인증 상태 (로그인이 되어있으면 true, 아니면 false)
// // 토큰 받아서 시간관리
// const [cookies, setCookie, removeCookies] = useCookies([
// "refreshAccessToken",
// ]);

//false : 로그인 한 유저 못들어감
const NewLoginPage = Auth(KakaoLoginPage, false); // 로그인 페이지

Expand All @@ -43,6 +51,44 @@ function App() {
const NewPaymentFailPage = Auth(PaymentFailPage, true);
const NewPackagingStatusPage = Auth(PackagingStatusPage, true);

// const minute = 1000 * 60 * 60 * 24; // 24시간
// // 주기적으로 실행되는 함수
// useInterval(() => {
// // 리프레시 토큰이 존재하고, 비어 있지 않은 경우
// if (
// cookies.refreshToken !== "undefined" &&
// cookies.refreshToken !== undefined &&
// cookies.refreshToken
// ) {
// // http 요청에 사용될 헤더 설정과 함께 서버에 토큰 갱신 요청
// let config = {
// headers: {
// Authorization: `${cookies.refreshToken}`,
// },
// withCredentials: true,
// };
// axios
// .get(`${process.env.REACT_APP_API_ROOT}/api/v1/refresh/token`, config)
// .then((response) => {
// // 현재 쿠키 삭제
// removeCookies();

// // 서버에서 받은 새로운 리프레시 토큰을 쿠키에 저장
// setCookie("refreshToken", response.data.refreshToken);

// // 홈 화면으로 이동
// navigate("/");
// })

// .catch((error) => {
// navigate("/kakaologin");
// });
// } else {
// // 리프레시 토큰이 존재하지 않거나 비어 있으면 쿠키 제거
// removeCookies();
// }
// }, minute - 60000); // 24시간 주기에서 1분을 뺀 주기로 주기적 실행

return (
<div className="App">
<Routes>
Expand All @@ -60,6 +106,7 @@ function App() {
<Route path="/termsofuse" element={<TermsOfUse />} />
<Route path="/privacypolicy" element={<PrivacyPolicy />} />
<Route path="/thirdparty" element={<ThirdpartyPage />} />
<Route path="/position" element={<PositionpolicyPage />} />
{/* 마이페이지-이벤트 페이지 */}
<Route path="/eventing" element={<EventingPage />} />
{/* 카페 상세 페이지*/}
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/pages/CafeSearch/CafeSearch.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.search-container {
width: 100%;
height: 94vh;
}

.search-list {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/CafeSearch/CafeSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ function CafeSearch() {
imgUrl: search_orda,
},
{
idx: 2,
idx: 3,
name: "카페 하랑",
address: "경기도 부천시 지봉로 2",
status: "영업종료",
time: "09:00에 영업시작",
imgUrl: search_harang,
},
{
idx: 3,
idx: 2,
name: "카페 드림",
address: "경기도 부천시 지봉로 3",
status: "영업중",
Expand Down
9 changes: 5 additions & 4 deletions src/pages/HomePage/Homepage.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* 바로 주문 */
.quick-order {
width: 90%;
height: 13%;
/* height: 13%; */
margin: 0 auto;
}

Expand All @@ -23,12 +23,13 @@

.quick-order-list {
width: 100%;
height: 80%;
/* height: 80%; */
display: flex;
flex-direction: row;
overflow-x: auto;
gap: 3%;
white-space: nowrap;
padding: 1rem 0.15rem;
}

.quick-order-list::-webkit-scrollbar {
Expand Down Expand Up @@ -70,7 +71,7 @@
/* 로그인 되어있지 않을 때 */
.not-login-box {
width: 99%;
height: 95%;
height: 7rem;
display: flex; /* Flexbox를 사용해 가로 정렬 */
align-items: center;
box-shadow: 0.25px 0.25rem 0.2rem rgba(0, 0, 0, 0.2); /* 그림자 추가 */
Expand Down Expand Up @@ -191,6 +192,6 @@
.business-list {
margin: 0 3% 0 3%;
font-family: "Light";
font-size: 12%;
font-size: 10px;
padding-bottom: 6rem;
}
18 changes: 2 additions & 16 deletions src/pages/HomePage/Homepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ import "./Homepage.css";
//`;

function Homepage() {
//const settings = {
// dots: false,
// infinite: true,
// speed: 500,
// slidesToShow: 1,
// slidesToScroll: 1,
// centerMode: true,
// autoplay: true,
// autoplaySpeed: 4000,
//};
//const [isLoggedIn, setIsLoggedIn] = useState(false);
// const [quickOrderItems, setQuickOrderItems] = useState([]); // 바로주문
// const [eventImages, setEventImages] = useState([]); // evetn 배너
// const [storeData, setsStoreData] = useState([]); // verypick
const isLoggedIn = useRecoilValue(loginState);

const eventCase = [
Expand Down Expand Up @@ -89,14 +75,14 @@ function Homepage() {
eventText: "테이크아웃 시 아메리카노 1,700원",
},
{
id: 2,
id: 3,
name: "카페하랑 부천점",
address: "경기도 부천시 지봉로 43",
img: home_harang,
eventText: "강의실에서 주문하고, 바로 가져가세요!",
},
{
id: 3,
id: 2,
name: "카페드림 가톨릭대학교 성심교정 중앙도서관점",
address:
"경기도 부천시 지봉로 43 가톨릭대학교 중앙도서관 1층 15베리타스관",
Expand Down
1 change: 1 addition & 0 deletions src/pages/MyPage/CouponPage/CouponPage.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.coupon-div {
width: 100%;
margin: 0 auto;
height: 94vh;
}

.coupon-list {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/MyPage/EventingPage/EventingPage.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.event-div {
width: 100%;
height: 100%;
height: 94vh;
}

.eventing-img {
margin-top: 40%;
margin-top: 10rem;
}
2 changes: 1 addition & 1 deletion src/pages/MyPage/MyPage.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.mypage-div {
width: 100%;
height: 100%;
height: 94vh;
background-color: #ffffff;
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyPage/MyprofilePage/MyprofilePage.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.myprofile-div {
width: 100%;
height: 100%;
height: 94vh;
background-color: #ffe2ed;
}

Expand Down
3 changes: 2 additions & 1 deletion src/pages/MyPage/PolicyPage/PolicyPage.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.policy-div {
width: 100%;
height: 100%;
height: 94vh;
margin: 0 auto;
}

Expand All @@ -10,6 +10,7 @@
flex-direction: column;
}

.position,
.personal-3rd,
.terms-of-use,
.personal-info {
Expand Down
7 changes: 7 additions & 0 deletions src/pages/MyPage/PolicyPage/PolicyPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ function PolicyPage() {
>
<div>개인정보 제3자 제공 동의</div>
</Link>
<Link
to="/position"
alt="위치 기반 서비스 이용약관"
className="position"
>
<div>위치 기반 서비스 이용약관</div>
</Link>
</div>
</div>
);
Expand Down
Loading

0 comments on commit f58016b

Please sign in to comment.