-
- 분식
- {item.store}
-
-
-
-
11:21
+ <>
+
{
+ handleOpenModal(index);
+ }}
+ >
+
+ {index}
+ {!isLast && } {/* 수정된 부분 */}
+
+
+
+
+
+
+
+ 분식
+ {item.store}
+
+
+
+ 11:21
+
-
-
{item.status}
-
-
+
{item.status}
+
+
+ {openId === index && (
+
+
+ 이 가게에 방문 완료하셨나요?
+ {item.store}
+
+ 다시 한 번 확인해주세요
+
+
+
+
+
+ )}
+ >
);
};
export default VisitItem;
+const ModalContainer = styled.div`
+ z-index: 1000;
+ top: 0;
+ left: 0;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.4);
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+`;
+
+const VisitModal = styled.div`
+ width: 296px;
+ height: 140px;
+ background-color: white;
+ border-radius: 5px;
+
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 20px;
+
+ .buttons {
+ width: 100%;
+ display: flex;
+ gap: 12px;
+ }
+
+ font-size: 18px;
+ color: ${({ theme }) => theme.color.gray900};
+ font-weight: ${({ theme }) => theme.fontWeight.semiBold};
+
+ .title-text {
+ font-size: 20px;
+ font-weight: ${({ theme }) => theme.fontWeight.bold};
+ color: ${({ theme }) => theme.color.primary};
+ margin-top: 16px;
+ margin-bottom: 20px;
+ }
+
+ .sub-text {
+ font-size: 14px;
+ color: ${({ theme }) => theme.color.gray600};
+ font-weight: ${({ theme }) => theme.fontWeight.regular};
+ margin-bottom: 20px;
+ }
+`;
+
const Container = styled.div`
display: flex;
flex-direction: column;
@@ -59,6 +160,7 @@ const Number = styled.div`
`;
const ListItem = styled.div`
+ cursor: pointer;
display: flex;
justify-content: space-between;
diff --git a/src/components/Market/VisitList.js b/src/components/Market/VisitList.js
index 60de80a..a21a5b1 100644
--- a/src/components/Market/VisitList.js
+++ b/src/components/Market/VisitList.js
@@ -1,7 +1,13 @@
import styled from "styled-components";
import VisitItem from "./VisitItem";
+import { useState } from "react";
const VisitList = ({ visitList }) => {
+ const [openedModal, setOpenedModal] = useState(null);
+ const handleOpenModal = (id) => {
+ setOpenedModal(id);
+ };
+ console.log(visitList);
return (
{visitList.map((item, index) => (
@@ -10,6 +16,8 @@ const VisitList = ({ visitList }) => {
index={index}
isLast={index === visitList.length - 1}
key={index} // 추가된 부분: key prop
+ openId={openedModal}
+ handleOpenModal={handleOpenModal}
/>
))}
diff --git a/src/components/Market/VisitTab.js b/src/components/Market/VisitTab.js
index 1ebfc7e..1c39fdc 100644
--- a/src/components/Market/VisitTab.js
+++ b/src/components/Market/VisitTab.js
@@ -1,8 +1,21 @@
import styled from "styled-components";
import VisitList from "./VisitList";
import { Map } from "react-kakao-maps-sdk";
+import { useState } from "react";
+import EditList from "./EditList";
const VisitTab = ({ visitList }) => {
+ const [isEdit, setIsEdit] = useState(false);
+ const [selectedList, setSelectedList] = useState([]);
+
+ const handleSelect = (id) => {
+ if (selectedList.includes(id)) {
+ setSelectedList(selectedList.filter((item) => item !== id));
+ } else {
+ setSelectedList([...selectedList, id]);
+ }
+ };
+
return (
);
};
export default VisitTab;
+const NavBar = styled.div`
+ margin: 25px;
+ display: flex;
+ justify-content: space-between;
+
+ .text-title {
+ font-size: 16px;
+ font-weight: ${({ theme }) => theme.fontWeight.semiBold};
+ color: ${({ theme }) => theme.color.gray900};
+ }
+
+ .edit {
+ font-size: 16px;
+ font-weight: ${({ theme }) => theme.fontWeight.medium};
+ color: ${({ theme }) => theme.color.gray500};
+ cursor: pointer;
+ }
+ .delete {
+ color: ${({ theme }) => theme.color.primary};
+ }
+ .disabled {
+ color: ${({ theme }) => theme.color.gray300};
+ cursor: default;
+ }
+`;
+
const Container = styled.div`
display: flex;
flex-direction: column;
diff --git a/src/components/OrderList/DayList.js b/src/components/OrderList/DayList.js
deleted file mode 100644
index 53d8b9c..0000000
--- a/src/components/OrderList/DayList.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import MarketList from "./MarketList";
-
-const { default: styled } = require("styled-components");
-
-const DayList = () => {
- return (
-
-
- 2024. 07. 22
-
-
- );
-};
-
-export default DayList;
-
-const GraySpace = styled.div`
- background-color: ${({ theme }) => theme.color.gray100};
- width: 100%;
- height: 6px;
-`;
-
-const DayContainer = styled.div`
- margin-top: 6px;
- display: flex;
- flex-direction: column;
- width: 100%;
- margin-bottom: 22px;
-`;
-
-const Date = styled.div`
- font-size: 18px;
- color: ${({ theme }) => theme.color.gray900};
- font-weight: ${({ theme }) => theme.fontWeight.semiBold};
- padding: 15px 20px 10px 20px;
- border-bottom: 1px solid ${({ theme }) => theme.color.gray100};
- margin-bottom: 8px;
-`;
diff --git a/src/components/OrderList/OrderDetail/MenuList.js b/src/components/OrderList/OrderDetail/MenuList.js
index c62becc..ad89f91 100644
--- a/src/components/OrderList/OrderDetail/MenuList.js
+++ b/src/components/OrderList/OrderDetail/MenuList.js
@@ -1,48 +1,109 @@
-import { GraySpace, ListContainer } from "pages/OrderDetailPage";
import styled from "styled-components";
const MenuList = () => {
return (
-
-
-
-
- 광어 모듬회 세트 1개
- 30,000원
-
-
- 우럭매운탕 1개
- 30,000원
-
-
-
+
+
+
+
+
광어 모듬회 세트 1개
+
+ 기본: 32,000원
+ 32,000원
+
+
+
+
+
+
+
광어 모듬회 세트 1개
+
+ 기본: 32,000원
+ 32,000원
+
+
+
+
+
+
+
광어 모듬회 세트 1개
+
+ 기본: 32,000원
+ 32,000원
+
+
+
+
);
};
export default MenuList;
-const MenuContainer = styled.div`
- margin-top: 14px;
- padding: 0 20px;
- gap: 28px;
- display: flex;
- flex-direction: column;
-`;
+const Container = styled.div`
+ width: calc(100% - 40px);
+ padding: 4 0px;
+ margin-top: 17px;
+ border-radius: 12px;
+ border: 1px solid ${({ theme }) => theme.color.gray100};
-const MenuItemContainer = styled.div`
- display: flex;
- flex-direction: column;
- gap: 10px;
-`;
+ .item {
+ padding: 0px 20px;
+ display: flex;
+ gap: 12px;
+ position: relative;
+ padding-bottom: 16px;
+ padding-top: 16px;
-const MenuName = styled.span`
- font-size: 16px;
- color: ${({ theme }) => theme.color.gray900};
- font-weight: ${({ theme }) => theme.fontWeight.medium};
-`;
+ &::after {
+ content: "";
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 1px;
+ background-color: ${({ theme }) => theme.color.gray100};
+ }
+
+ &:last-child::after {
+ content: none;
+ }
+
+ img {
+ width: 70px;
+ height: 70px;
+ border-radius: 12px;
+ }
+
+ .menu {
+ padding: 1px 0;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ gap: 8px;
+
+ span {
+ font-size: 16px;
+ font-weight: ${({ theme }) => theme.fontWeight.medium};
+ color: ${({ theme }) => theme.color.gray900};
+ }
+
+ .price {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+
+ .price-text {
+ font-size: 14px;
+ font-weight: ${({ theme }) => theme.fontWeight.medium};
+ color: ${({ theme }) => theme.color.gray500};
+ }
-const MenuPrice = styled.span`
- font-size: 16px;
- color: ${({ theme }) => theme.color.gray900};
- font-weight: ${({ theme }) => theme.fontWeight.bold};
+ .sub-text {
+ font-size: 16px;
+ font-weight: ${({ theme }) => theme.fontWeight.bold};
+ color: ${({ theme }) => theme.color.gray900};
+ }
+ }
+ }
+ }
`;
diff --git a/src/components/OrderList/OrderDetail/SimpleReceipt.js b/src/components/OrderList/OrderDetail/SimpleReceipt.js
index 93b206d..38c3902 100644
--- a/src/components/OrderList/OrderDetail/SimpleReceipt.js
+++ b/src/components/OrderList/OrderDetail/SimpleReceipt.js
@@ -1,85 +1,51 @@
-import { GraySpace, ListContainer } from "pages/OrderDetailPage";
+import { ListContainer } from "pages/OrderDetailPage";
import styled from "styled-components";
const SimpleReceipt = () => {
return (
-
-
- 배달이 완료되었어요
-
- 광장시장
-
- 세미수산
-
-
- 광어 모듬회 세트 외 3
- 61,000원
-
-
- 주문일시: 2024년 7월 17일 오후 08:12
- 주문번호: B1UD01004L
-
-
-
+
+
+ 2024년 7월 17일 오후 08:12 주문
+ 주문번호 B1UD01004L
+
+
+ 세미수산
+ 픽업이 완료되었어요
+
+
);
};
export default SimpleReceipt;
-const State = styled.div`
- font-size: 14px;
- color: ${({ theme }) => theme.color.primary};
- font-weight: ${({ theme }) => theme.fontWeight.semiBold};
- padding: 16px 20px 13px 20px;
- border-bottom: 1px solid ${({ theme }) => theme.color.gray100};
- margin-bottom: 8px;
-`;
-
-const MarketName = styled.div`
- font-size: 14px;
- color: ${({ theme }) => theme.color.gray500};
- font-weight: ${({ theme }) => theme.fontWeight.bold};
- margin-bottom: 11px;
-`;
-
-const StoreContainer = styled.div`
- padding: 0 20px;
+const Container = styled.div`
+ margin-top: 16px;
display: flex;
flex-direction: column;
- gap: 10px;
-`;
-
-const StoreItem = styled.div`
- display: flex;
- justify-content: space-between;
-`;
-
-const StoreName = styled.div`
- font-size: 18px;
- color: ${({ theme }) => theme.color.gray900};
- font-weight: ${({ theme }) => theme.fontWeight.bold};
-`;
-
-const StoreMenu = styled.div`
- font-size: 14px;
- color: ${({ theme }) => theme.color.gray500};
- font-weight: ${({ theme }) => theme.fontWeight.bold};
-`;
-
-const StorePrice = styled.div`
- font-size: 18px;
- color: ${({ theme }) => theme.color.gray900};
- font-weight: ${({ theme }) => theme.fontWeight.semiBold};
-`;
-
-const OrderInfo = styled.div`
- display: flex;
- flex-direction: column;
-`;
-
-const OrderItem = styled.div`
- font-size: 14px;
- color: ${({ theme }) => theme.color.gray500};
- font-weight: ${({ theme }) => theme.fontWeight.bold};
- margin-top: 13px;
+ gap: 32px;
+ width: calc(100% - 40px);
+
+ .container {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+ }
+
+ .order {
+ font-size: 14px;
+ font-weight: ${({ theme }) => theme.fontWeight.medium};
+ color: ${({ theme }) => theme.color.gray600};
+ }
+
+ .title-text {
+ font-size: 20px;
+ font-weight: ${({ theme }) => theme.fontWeight.semiBold};
+ color: ${({ theme }) => theme.color.gray900};
+ }
+
+ .sub-text {
+ font-size: 16px;
+ font-weight: ${({ theme }) => theme.fontWeight.semiBold};
+ color: ${({ theme }) => theme.color.primary};
+ }
`;
diff --git a/src/pages/HomePage.js b/src/pages/HomePage.js
index b7d7423..0c9fbdc 100644
--- a/src/pages/HomePage.js
+++ b/src/pages/HomePage.js
@@ -22,8 +22,8 @@ const HomePage = () => {
useEffect(() => {
syluvAxios.get("/home").then((res) => {
- setLatestMarkets(res.data.payload.visitListHomeList);
- setHotMarkets(res.data.payload.hotListHomeList);
+ setLatestMarkets(res.data?.payload.visitListHomeList);
+ setHotMarkets(res.data?.payload.hotListHomeList);
});
}, []);
diff --git a/src/pages/MenuTestPage.js b/src/pages/MenuTestPage.js
index b80c514..6b859e3 100644
--- a/src/pages/MenuTestPage.js
+++ b/src/pages/MenuTestPage.js
@@ -1,4 +1,5 @@
import { useQuery } from "@tanstack/react-query";
+import Splash from "components/Common/Splash";
import useSyluvAxios from "hooks/useSyluvAxios";
import React, { useEffect, useState } from "react";
@@ -16,7 +17,7 @@ const MenuTestPage = () => {
}
}, [data]);
- if (isLoading) return
;
+ if (isLoading) return
;
if (isError) return
Error: {error.message}
;
return (
diff --git a/src/pages/OrderDetailPage.js b/src/pages/OrderDetailPage.js
index 5439d75..7ce9b40 100644
--- a/src/pages/OrderDetailPage.js
+++ b/src/pages/OrderDetailPage.js
@@ -1,6 +1,5 @@
import Button from "components/Common/Button";
import Header from "components/Common/Header";
-import AmountList from "components/OrderList/OrderDetail/AmoutList";
import MenuList from "components/OrderList/OrderDetail/MenuList";
import SimpleReceipt from "components/OrderList/OrderDetail/SimpleReceipt";
import { useNavigate, useParams } from "react-router-dom";
@@ -11,13 +10,10 @@ const OrderDetailPage = () => {
const { orderId } = useParams();
return (
-
+
-
-
-
theme.color.gray100};
- width: 100%;
- height: 6px;
-`;
-
-export const ListContainer = styled.div`
- margin-top: 6px;
- display: flex;
- flex-direction: column;
- width: 100%;
- margin-bottom: 22px;
-`;
-
const ButtonContainer = styled.div`
display: flex;
justify-content: space-between;
- width: calc(100% - 68px);
+ width: calc(100% - 30px);
gap: 17px;
position: absolute;
bottom: 32px;
`;
-
-const ButtonSpace = styled.div`
- height: 48px;
- margin-bottom: 32px;
-`;
diff --git a/src/pages/OrderListPage.js b/src/pages/OrderListPage.js
index f1f8725..b616ce6 100644
--- a/src/pages/OrderListPage.js
+++ b/src/pages/OrderListPage.js
@@ -1,13 +1,28 @@
import Header from "components/Common/Header";
-import DayList from "components/OrderList/DayList";
import styled from "styled-components";
+import { ReactComponent as NoItem } from "assets/images/no-item.svg";
+import Button from "components/Common/Button";
+import { useNavigate } from "react-router-dom";
const OrderListPage = () => {
- return (
+ const navigate = useNavigate();
+ const orderList = null;
+ return orderList === null ? (
-
-
+
+ ) : (
+ <>
+
+
+
+ navigate("/")}
+ type="2"
+ text="유도문구 뭐하지"
+ />
+
+ >
);
};
@@ -24,4 +39,16 @@ const Container = styled.div`
scrollbar-width: none; // Firefox
`;
+const NoItemContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+
+ padding: 0 20px;
+ gap: 43px;
+
+ height: calc(100dvh - 140px);
+`;
+
export default OrderListPage;
diff --git a/src/pages/QrPage.js b/src/pages/QrPage.js
index 40c9e5b..e32c760 100644
--- a/src/pages/QrPage.js
+++ b/src/pages/QrPage.js
@@ -102,13 +102,15 @@ const Header = styled.div`
`;
const Container = styled.div`
- height: 100vh;
+ height: 100dvh;
width: 480px;
position: relative;
@media (max-width: 480px) {
width: 100dvw;
}
+ overflow: hidden;
+ max-height: 100vh;
`;
const Camera = styled.video`
@@ -120,11 +122,16 @@ const Camera = styled.video`
const Hole = styled.div`
z-index: 3;
- aspect-ratio: 1/1;
border-radius: 20px;
border: 2px solid ${({ theme }) => theme.color.primary};
- width: 85%;
+ width: 400px;
+ height: 400px;
+
+ @media (max-width: 480px) {
+ height: calc(100vw - 40px);
+ width: calc(100vw - 40px);
+ }
position: absolute;
top: 50%;
@@ -135,9 +142,8 @@ const Hole = styled.div`
const Overlay = styled.div`
z-index: 2;
- width: 85%;
-
- aspect-ratio: 1/1;
+ height: 400px;
+ width: 400px;
border-radius: 414px;
border: 400px solid rgba(0, 0, 0, 0.8);
@@ -145,6 +151,13 @@ const Overlay = styled.div`
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
+
+ @media (max-width: 480px) {
+ height: calc(100vw - 40px);
+ width: calc(100vw - 40px);
+ }
+
+ overflow: hidden;
`;
const Text = styled.div`
@@ -157,7 +170,7 @@ const Text = styled.div`
display: flex;
gap: 4px;
- top: 73%;
+ top: 80%;
left: 50%;
transform: translate(-50%, 50%);
diff --git a/src/pages/ReviewPage.js b/src/pages/ReviewPage.js
index f3412e7..06dd7d0 100644
--- a/src/pages/ReviewPage.js
+++ b/src/pages/ReviewPage.js
@@ -6,12 +6,16 @@ import add from "assets/images/add-button.png";
import { useEffect, useState } from "react";
import Button from "components/Common/Button";
import { useParams } from "react-router-dom";
+import { Swiper, SwiperSlide } from "swiper/react";
+import "swiper/css";
+import "swiper/css/navigation";
const ReviewPage = () => {
const [review, setReview] = useState("");
const [currentCount, setCurrentCount] = useState(0);
const [rating, setRating] = useState(0);
const [ratingText, setRatingText] = useState("");
+ const [photos, setPhotos] = useState([]);
const { orderId } = useParams();
useEffect(() => {
@@ -34,6 +38,11 @@ const ReviewPage = () => {
setRatingText(ratingTexts[rating]);
}, [rating]);
+ const handlePhotoChange = (e) => {
+ const files = Array.from(e.target.files);
+ setPhotos([...photos, ...files]);
+ };
+
return (
@@ -82,10 +91,37 @@ const ReviewPage = () => {
/300