@@ -15,8 +19,8 @@ const StoreMap = ({ store }) => {
- {store.nearbyStation}
-
+ {store.nearbyStation}
+
);
@@ -32,10 +36,7 @@ const StoreMapContainer = styled.div`
& > div {
display: flex;
- flex-direction: row;
- align-items: center;
gap: 5px;
-
& > svg {
color: ${DarkGrey};
}
@@ -57,6 +58,10 @@ const MapBox = styled.div`
const StaitionBox = styled.div`
width: 100%;
display: flex;
- flex-direction: row;
+ flex-direction: column;
gap: 10px;
`;
+
+const Staition = styled.p`
+ width: 100%;
+`;
diff --git a/src/components/storeDetail/StoreOverview.jsx b/src/components/storeDetail/StoreOverview.jsx
index cbc9c2a..7b080e8 100644
--- a/src/components/storeDetail/StoreOverview.jsx
+++ b/src/components/storeDetail/StoreOverview.jsx
@@ -2,18 +2,43 @@ import React from 'react';
import styled from 'styled-components';
import DetailBox from './DetailBox';
import { Orange, Grey } from '../../color';
-import { Phone, LocationOn, PunchClock } from '@mui/icons-material';
const StoreOverview = ({ store }) => {
+ if (!store || Object.keys(store).length === 0) {
+ return
로딩 중...
;
+ }
+
+ const menues = store.menuAndPrice.split(', ').map((item) => {
+ if (item.includes(':')) {
+ const [name, price] = item.split(': ');
+ return { name, price };
+ } else {
+ const [name, price] = item.split(' ');
+ return { name, price };
+ }
+ });
+
return (
-
- } label="전화" content={store.phone} />
- } label="위치" type="address" content={store.address} />
- } label="영업 시간" type="time" content={store.businessHours} />
-
-
+ 식당 정보
+
+
+
+
+
+
+
+
+ 메뉴
+ {menues.map((menu, idx) => {
+ return (
+
+ {menu.name}
+ {menu.price}
+
+ );
+ })}
);
@@ -33,13 +58,19 @@ const ContentBox = styled.div`
display: flex;
flex-direction: column;
gap: 20px;
- box-shadow: 1px 1px 1px ${Grey};
border: 1px solid ${Grey};
border-radius: 10px;
+ margin-bottom: 20px;
+`;
- & > div {
- display: flex;
- flex-direction: column;
- gap: 20px;
- }
+const DetailContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const MenuBox = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
`;
diff --git a/src/components/storeDetail/StorePreview.jsx b/src/components/storeDetail/StorePreview.jsx
index bb18b01..9112e3b 100644
--- a/src/components/storeDetail/StorePreview.jsx
+++ b/src/components/storeDetail/StorePreview.jsx
@@ -48,6 +48,7 @@ const StorePreviewContainer = styled.div`
flex-direction: column;
align-items: center;
text-align: center;
+ padding-bottom: 20px;
border-bottom: 1px solid ${Orange};
`;
@@ -77,8 +78,7 @@ const NameAndCategoryBox = styled.div`
gap: 10px;
& > h1 {
- font-weight: 500;
- color: ${Orange};
+ font-weight: 700;
}
`;
diff --git a/src/pages/DetailPage.jsx b/src/pages/DetailPage.jsx
deleted file mode 100644
index 4201462..0000000
--- a/src/pages/DetailPage.jsx
+++ /dev/null
@@ -1,160 +0,0 @@
-import styled from 'styled-components';
-import { useStoreDetail } from '../store';
-import { useState, useEffect } from 'react';
-import { StorePreview, StoreMap, StoreInsight, StoreOverview, ReviewDetail, StoreTip } from '../components/storeDetail';
-import { Grey, White } from '../color';
-import { Footer } from '../components/common';
-import { useNavigate, useParams } from 'react-router-dom';
-import { getStoreDetail } from '../apis/api/getStoreDetail';
-import { Button } from '../components/common';
-import { ReactComponent as BookmarkIcon } from '../assets/Icon/detail/Bookmark.svg';
-
-const DetailPage = () => {
- const [item, setItem] = useState({});
- const { id } = useParams();
- const navigate = useNavigate();
- const [isLoading, setIsLoading] = useState(false);
- const storeId = id;
- const { setStoreDetail } = useStoreDetail();
-
- const fetchStoreDetail = async (storeId) => {
- setIsLoading(true);
- try {
- const response = await getStoreDetail({ storeId });
- const newData = response.data;
- if (typeof newData.businessHours === 'string') {
- try {
- const jsonString = newData.businessHours.replace(/'/g, '"');
- newData.businessHours = JSON.parse(jsonString);
- } catch (e) {
- console.error('Failed to parse business_hours:', e);
- }
- }
- setItem(newData);
- console.log(newData);
- setStoreDetail(newData);
- } catch (error) {
- console.log(error);
- }
- setIsLoading(false);
- };
-
- useEffect(() => {
- if (storeId) {
- fetchStoreDetail(storeId);
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [storeId]);
-
- const buttonClickHandler = () => {
- navigate('/webmap');
- };
-
- const { toggleStoreDetailPage, isStoreDetailPage } = useStoreDetail();
-
- if (!isStoreDetailPage) {
- toggleStoreDetailPage();
- }
-
- return (
- <>
- {!isLoading && (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )}
- {isLoading &&
}
-
- >
- );
-};
-
-export default DetailPage;
-
-const DetailPageLayout = styled.div`
- width: 80%;
- max-width: 1000px;
- min-height: 100vh;
- margin: 30px auto 0px auto;
- display: flex;
- gap: 20px;
- flex-direction: column;
- justify-content: center;
-
- @media screen and (max-width: 1024px) {
- width: 100%;
- }
-`;
-
-const StoreOverviewContainer = styled.div`
- display: flex;
- flex-direction: row;
- gap: 30px;
-
- @media screen and (max-width: 1024px) {
- flex-direction: column;
- margin: 10px 10px;
- }
-`;
-
-const StyledLeftContainer = styled.div`
- flex: 1;
- display: flex;
- flex-direction: column;
- gap: 20px;
- padding: 10px;
- border: 1px solid ${Grey};
-`;
-
-const StyledRightContainer = styled.div`
- flex: 0.5;
- display: flex;
- flex-direction: column;
- gap: 20px;
-
- @media screen and (max-width: 1024px) {
- flex: 1;
- }
-`;
-
-const BookmarkBox = styled.div`
- width: 100%;
- height: 80px;
- margin-top: 50px;
- padding: 20px;
- border: 1px solid ${Grey};
- border-radius: 10px;
- box-shadow: 1px 1px 1px ${Grey};
-
- display: flex;
- gap: 20px;
- align-items: center;
-
- & > button {
- background-color: ${White};
- font-size: 18px;
- font-weight: 600;
-
- &:hover {
- cursor: pointer;
- }
- }
-`;
diff --git a/src/pages/StoreDetailPage.jsx b/src/pages/StoreDetailPage.jsx
index c818591..63bc2c6 100644
--- a/src/pages/StoreDetailPage.jsx
+++ b/src/pages/StoreDetailPage.jsx
@@ -1,43 +1,21 @@
import styled from 'styled-components';
-import { ReactComponent as Logo } from '../assets/Icon/Logo.svg';
-import { ReactComponent as Star } from '../assets/Icon/detail/Star.svg';
-import { ReactComponent as Insight } from '../assets/Icon/detail/Insight.svg';
-import { ReactComponent as SoloDining } from '../assets/Icon/detail/SoloDining.svg';
-import { ReactComponent as Parking } from '../assets/Icon/detail/Parking.svg';
-import { ReactComponent as Dog } from '../assets/Icon/detail/Dog.svg';
-import { ReactComponent as Clock } from '../assets/Icon/detail/Clock.svg';
-import { ReactComponent as Recommended } from '../assets/Icon/detail/Recommended.svg';
-import { ReactComponent as ParkingTip } from '../assets/Icon/detail/PakingTip.svg';
-import { ReactComponent as WaitingTip } from '../assets/Icon/detail/WaitingTip.svg';
-import { ReactComponent as Path } from '../assets/Icon/detail/Path.svg';
-import { DarkGrey, LightGrey, Grey, Orange, White } from '../color';
-import { MyMap } from '../components/common';
import { useStoreDetail } from '../store';
-import { useEffect, useState } from 'react';
-import { useNavigate, useParams } from 'react-router-dom/dist';
+import { useState, useEffect } from 'react';
+import { StorePreview, StoreMap, StoreInsight, StoreOverview, ReviewDetail, StoreTip } from '../components/storeDetail';
+import { Grey, LightGrey, White } from '../color';
+import { Footer } from '../components/common';
+import { useNavigate, useParams } from 'react-router-dom';
import { getStoreDetail } from '../apis/api/getStoreDetail';
+import { Button } from '../components/common';
+import { ReactComponent as BookmarkIcon } from '../assets/Icon/detail/Bookmark.svg';
const StoreDetailPage = () => {
- const [item, setItem] = useState('');
+ const [item, setItem] = useState({});
const { id } = useParams();
const navigate = useNavigate();
-
+ const [isLoading, setIsLoading] = useState(false);
const storeId = id;
- const piechart = [item.neutralRatio, item.negativeRatio + item.neutralRatio, item.neutralRatio];
- const tip = {
- isSoloDining: item.isSoloDining ? '가능' : '불가능',
- isParking: item.isParking ? '가능' : '불가능',
- isPetFriendly: item.isPetFriendly ? '가능' : '불가능',
- isWaiting: item.isWaiting ? '있는' : '없는',
- };
-
const { setStoreDetail } = useStoreDetail();
- const [isLoading, setIsLoading] = useState();
- const { toggleStoreDetailPage, isStoreDetailPage } = useStoreDetail();
-
- if (!isStoreDetailPage) {
- toggleStoreDetailPage();
- }
const fetchStoreDetail = async (storeId) => {
setIsLoading(true);
@@ -53,6 +31,7 @@ const StoreDetailPage = () => {
}
}
setItem(newData);
+ console.log(newData);
setStoreDetail(newData);
} catch (error) {
console.log(error);
@@ -67,569 +46,137 @@ const StoreDetailPage = () => {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [storeId]);
- const logoClickHandler = () => {
- navigate('/');
- };
-
const buttonClickHandler = () => {
navigate('/webmap');
};
- const pathClickHandler = () => {
- window.location.href = item.storeLink;
- };
+ const { toggleStoreDetailPage, isStoreDetailPage } = useStoreDetail();
+
+ if (!isStoreDetailPage) {
+ toggleStoreDetailPage();
+ }
return (
- !isLoading && (
-
-
-
-
-
-

-
-
-
- {item.name}
+ <>
+
+
+ {item.name}
+
+ {!isLoading && (
+
+
+
+
-
-
리뷰 {item.reviewsCount}
-
{item.category}
+
+
+
-
-
-
-
-
-
-
AI리뷰 인사이트
-
-
- AI가 다수의 고객 리뷰를 정밀히 분석하여 숨겨진 인사이트를 찾아주는 서비스 입니다.
-
-
-
-
- 혼밥 {tip.isSoloDining}
-
-
-
-
-
애완견 동반 {tip.isPetFriendly}
-
-
-
-
웨이팅 {tip.isWaiting} 맛집
-
-
-
-
-
- AI리뷰 한 줄 요약
-
-
- {item.reviewSummary}
-
-
-
- AI 긍정/부정/중립 리뷰 비율
- AI가 분석한 이 식당의 긍정적인 리뷰의 비율은 {item.positiveRatio}%입니다.
-
-
-
-
-
- 긍정 {item.positiveRatio}% 중립 {item.neutralRatio}% 부정 {item.negativeRatio}%
-
-
-
-
:긍정
-
-
:중립
-
-
:부정
-
-
-
-
- AI 리뷰 긍정키워드
-
-
AI가 분석한 이 식당 리뷰의 긍정 키워드
-
{item.positiveKeywords}
-
- AI 리뷰 부정키워드
-
-
AI가 분석한 이 식당 리뷰의 부정 키워드
-
{item.negativeKeywords}
-
-
-
- AI 추천 메뉴
- 리뷰를 분석해 AI가 메뉴를 추천해줍니다.
-
-
-
{item.recommendMenu}
-
-
-
- AI TIP
-
-
-
-
주차 팁
-
{item.parkingTip}
-
-
-
-
웨이팅 꿀팁
-
{item.waitingTip}
-
-
-
-
-
-
-
식당 정보
-
-
-
-
개요
-
-
-
-
영업시간
- {Array.isArray(item.businessHours) &&
- item.businessHours.map((item, idx) =>
{item}
)}
-
-
-
-
메뉴
-
{item.menuAndPrice}
-
-
-
-
-
-
-
-
-
-
-
- )
+
+
+
+
+
+
+
+
+
+
+
+ )}
+ {isLoading &&
로딩중,,
}
+
+ >
);
};
export default StoreDetailPage;
-const StoreDetailLayout = styled.div`
+const DetailPageLayout = styled.div`
+ width: 80%;
+ max-width: 1000px;
+ min-height: 100vh;
+ margin: 30px auto 0px auto;
display: flex;
- padding: 20px;
- width: 100%;
- height: auto;
- font-size: 16px;
+ gap: 20px;
flex-direction: column;
- align-items: center;
- text-align: center;
- @media screen and (max-width: 1024px) {
- padding: 20px;
- font-size: 13px;
- }
-`;
+ justify-content: center;
-const Header = styled.div`
- display: flex;
- padding-left: 100px;
- padding-right: 100px;
- justify-content: space-between;
- width: 100%;
- height: 125px;
- align-items: center;
- background-color: ${White};
- border-bottom: 2px solid ${Grey};
- & > svg {
- cursor: pointer;
- width: 200px;
- height: 120px;
- }
- & > button {
- width: fit-content;
- text-align: center;
- padding: 15px;
- color: ${Orange};
- background: ${LightGrey};
- font-weight: bold;
- border-radius: 10px;
- cursor: pointer;
- &:hover {
- background: ${Orange};
- color: ${White};
- }
- }
@media screen and (max-width: 1024px) {
- padding: 0px;
- margin: 0px;
- height: 60px;
- & > button {
- width: 120px;
- }
- & > svg {
- display: none;
- }
- justify-content: flex-end;
- border-bottom: none;
+ width: 100%;
}
`;
-const ContentsContainer = styled.div`
- display: flex;
- flex-direction: column;
- justify-content: center;
-`;
-
-const ImageAndOverView = styled.div`
- border-bottom: 1px solid ${Grey};
+const StoreOverviewContainer = styled.div`
display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: flex-start;
+ flex-direction: row;
gap: 30px;
- padding-bottom: 20px;
- :first-child {
- display: flex;
- align-items: flex-start;
- }
- & > div {
- margin-top: 10px;
- display: flex;
- width: 100%;
- flex-direction: row;
- align-items: center;
- gap: 30px;
- & > img {
- width: 60%;
- max-height: 300px;
- border-radius: 10px;
- }
- & > button {
- display: flex;
- align-items: center;
- justify-content: center;
- color: ${Orange};
- gap: 10px;
- width: 90px;
- height: 40px;
- font-size: 16px;
- border-radius: 20px;
- border: 1px solid ${Orange};
- background-color: ${White};
- & > svg {
- width: 15px;
- }
- cursor: pointer;
- }
- & > h1 {
- color: ${Orange};
- }
- & > div {
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- & > h4 {
- color: ${Orange};
- }
- @media screen and (max-width: 1024px) {
- & > img {
- width: 50%;
- min-height: 200px;
- border-radius: 10px;
- }
- }
+
+ @media screen and (max-width: 1024px) {
+ flex-direction: column;
+ margin: 10px 10px;
}
`;
-const AIReviewInsightBox = styled.div`
+const StyledLeftContainer = styled.div`
+ flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
- padding-bottom: 30px;
- border-bottom: 1px solid ${Grey};
-`;
-
-const TitleBox = styled.div`
- margin-top: 20px;
- & > div {
- width: 250px;
- display: flex;
- flex-direction: row;
- align-items: center;
- gap: 10px;
- & > h2 {
- color: ${Orange};
- }
- }
- & > h2 {
- color: ${Orange};
- }
- & > p {
- margin-top: 10px;
- color: ${DarkGrey};
- font-size: 13px;
- }
+ padding: 10px;
`;
-const BasicInfoBox = styled.div`
- margin-top: 30px;
+const StyledRightContainer = styled.div`
+ flex: 0.5;
display: flex;
- flex-direction: row;
+ flex-direction: column;
gap: 20px;
- & > div {
- display: flex;
- flex-direction: column;
- gap: 10px;
- align-items: center;
- & > span {
- width: 80px;
- font-weight: bold;
- display: flex;
- }
- & > div {
- width: 80px;
- display: flex;
- align-items: center;
- font-weight: bold;
- justify-content: center;
- text-align: center;
- }
- @media screen and (max-width: 500px) {
- min-width: 150px;
- }
- }
-`;
-const StoreContents = styled.div`
- display: flex;
- flex-direction: row;
- @media screen and (max-width: 500px) {
- display: flex;
- flex-direction: column;
+ @media screen and (max-width: 1024px) {
+ flex: 1;
}
`;
-const ReviewSummaryBox = styled.div`
- display: flex;
- flex-direction: column;
- gap: 10px;
- margin-bottom: 50px;
-`;
-
-const Content = styled.div`
- max-width: 700px;
- height: 150px;
- border: 1px solid ${Grey};
- color: ${DarkGrey};
- border-radius: 20px;
- display: flex;
- align-items: center;
+const BookmarkBox = styled.div`
+ width: 100%;
+ height: 80px;
+ margin-top: 50px;
padding: 20px;
- background-color: ${White};
- box-shadow: 2px 2px 2px ${Grey};
- line-height: 2;
-`;
+ border: 1px solid ${Grey};
+ border-radius: 10px;
-const PositiveRatioBox = styled.div`
display: flex;
- flex-direction: row;
gap: 20px;
align-items: center;
- & > div {
- display: flex;
- flex-direction: column;
- gap: 20px;
- & > h3 > span {
- color: ${Orange};
- }
- & > p {
- font-size: 13px;
- color: ${DarkGrey};
- }
- & > h4 {
- color: ${Orange};
- }
- }
-`;
-
-const PieChartBox = styled.div`
- box-shadow: 2px 2px 2px ${Grey};
- border-radius: 20px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- padding: 20px;
- gap: 20px;
- & > div {
- color: ${DarkGrey};
- display: flex;
- flex-direction: row;
- gap: 10px;
- :nth-child(2n + 1) {
- width: 35px;
- height: 20px;
- }
- :first-child {
- background-color: ${Orange};
- }
- :nth-child(3) {
- background-color: #fff1e1;
- }
- :nth-child(5) {
- background-color: #ff9a62;
- }
- }
- margin-bottom: 30px;
-`;
-
-const PieChart = styled.div`
- display: inline-block;
- position: relative;
- width: 200px;
- height: 200px;
- background: ${(props) => `conic-gradient(
- #ff9a62 0% ${props.piechart[0]}%,
- #fff1e1 ${props.piechart[0]}% ${props.piechart[1]}%,
- ${Orange} ${props.piechart[2]}% 100%
- )`};
- border-radius: 50%;
-`;
-const RecommendBox = styled.div`
- display: flex;
- flex-direction: column;
- gap: 10px;
- & > h2 {
- color: ${Orange};
- }
- & > p {
- color: ${DarkGrey};
- font-size: 13px;
- }
- & > div {
- display: flex;
- flex-direction: row;
- gap: 20px;
- }
- margin-bottom: 30px;
-`;
+ & > button {
+ background-color: ${White};
+ font-size: 18px;
+ font-weight: 600;
-const TipBox = styled.div`
- display: flex;
- flex-direction: column;
- gap: 20px;
- & > h2 {
- color: ${Orange};
- }
- & > div {
- display: flex;
- flex-direction: row;
- gap: 30px;
- & > div {
- min-width: 200px;
- height: 200px;
- display: flex;
- gap: 10px;
- border-radius: 20px;
- border: 1px solid ${Orange};
- flex-direction: column;
- justify-content: center;
- padding: 20px;
- box-shadow: 2px 2px 2px ${Grey};
- }
- }
- @media screen and (max-width: 1024px) {
- & > div > div {
- min-width: 100px;
+ &:hover {
+ cursor: pointer;
}
}
`;
-const OverViewContainer = styled.div`
- margin-top: 30px;
- display: flex;
- flex-direction: column;
- gap: 20px;
- & > div > h2 {
- color: ${Orange};
- }
- & > div {
- display: flex;
- gap: 20px;
- }
- & > div > div > div {
- display: flex;
- flex-direction: column;
- gap: 10px;
- }
- padding-bottom: 30px;
- border-bottom: 1px solid ${Grey};
-`;
-
-const OverViewAndMenuBox = styled.div`
+const ButtonBox = styled.div`
+ position: sticky;
+ width: 100%;
+ height: 80px;
display: flex;
flex-direction: row;
- & > div {
- display: flex;
- flex-direction: column;
- gap: 20px;
- }
-`;
-
-const LocationContainer = styled.div`
- margin-top: 30px;
- display: flex;
- flex-direction: column;
- gap: 30px;
- & > div {
- display: flex;
- flex-direction: row;
- gap: 20px;
- & > h2 {
- color: ${Orange};
- }
- & > p {
- font-weight: 600;
- }
- }
- padding-bottom: 30px;
-`;
+ align-items: center;
+ gap: 10px;
+ background-color: ${White};
+ border-bottom: 1px solid ${LightGrey};
+ padding: 10px;
+ z-index: 10;
+ top: 0;
+ left: 0;
-const MapBox = styled.div`
- border-radius: 20px;
- height: 500px;
- & > div {
- border-radius: 20px;
+ @media screen and (max-width: 1024px) {
+ flex: 1;
+ height: 60px;
}
`;
diff --git a/src/pages/index.js b/src/pages/index.js
index e2033c4..222acea 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -3,4 +3,4 @@ import WebMap from './WebMapPage';
import StoreDetailPage from './StoreDetailPage';
import SignUpPage from './SignUpPage';
import LoginPage from './LoginPage';
-export { MainPage, WebMap, StoreDetailPage, SignUpPage, LoginPage };
+export { MainPage, WebMap, SignUpPage, LoginPage, StoreDetailPage };
From fadae5cbb43109195619848d2ab17165b5bea578 Mon Sep 17 00:00:00 2001
From: "songhj10207@naver.com"
Date: Sun, 17 Nov 2024 16:39:01 +0900
Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=EC=83=81=EC=84=B8=20=ED=8E=98?=
=?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=B0=98=EC=9D=91=ED=98=95=20=EB=A0=88?=
=?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/storeDetail/ReviewDetail.jsx | 5 ++
src/components/storeDetail/StoreMap.jsx | 3 +-
src/components/storeDetail/StorePreview.jsx | 84 +++++++++++++--------
3 files changed, 58 insertions(+), 34 deletions(-)
diff --git a/src/components/storeDetail/ReviewDetail.jsx b/src/components/storeDetail/ReviewDetail.jsx
index c4dff67..766f63b 100644
--- a/src/components/storeDetail/ReviewDetail.jsx
+++ b/src/components/storeDetail/ReviewDetail.jsx
@@ -59,6 +59,11 @@ const ContentBox = styled.div`
border: 1px solid ${Grey};
border-radius: 10px;
gap: 10px;
+
+ @media screen and (max-width: 1024px) {
+ border-bottom: 1px solid ${Grey};
+ border-radius: none;
+ }
`;
const TitleBox = styled.div`
diff --git a/src/components/storeDetail/StoreMap.jsx b/src/components/storeDetail/StoreMap.jsx
index 8682ab9..1aedb91 100644
--- a/src/components/storeDetail/StoreMap.jsx
+++ b/src/components/storeDetail/StoreMap.jsx
@@ -33,6 +33,7 @@ const StoreMapContainer = styled.div`
display: flex;
flex-direction: column;
gap: 10px;
+ padding-bottom: 30px;
& > div {
display: flex;
@@ -41,13 +42,11 @@ const StoreMapContainer = styled.div`
color: ${DarkGrey};
}
}
- padding-bottom: 30px;
`;
const MapBox = styled.div`
border-radius: 20px;
width: 100%;
-
height: 300px;
& > div {
diff --git a/src/components/storeDetail/StorePreview.jsx b/src/components/storeDetail/StorePreview.jsx
index 9112e3b..07a162a 100644
--- a/src/components/storeDetail/StorePreview.jsx
+++ b/src/components/storeDetail/StorePreview.jsx
@@ -1,7 +1,8 @@
import styled from 'styled-components';
-import { DarkGrey, Orange } from '../../color';
+import { DarkGrey, Grey, LightGrey, Orange } from '../../color';
import { LocationButton } from '../common';
import { ReactComponent as StarIcon } from '../../assets/Icon/detail/Star.svg';
+import { LocationOn } from '@mui/icons-material';
const StorePreview = ({ store }) => {
const pathClickHandler = () => {
@@ -22,19 +23,20 @@ const StorePreview = ({ store }) => {
-
{store.category}
+
{store.category}
{store.rating}
-
리뷰 {store.reviewsCount}개
-
-
-
{store.nearbyStation}
+
리뷰 {store.reviewsCount}개
- {store.positiveRatio}% 긍정비율
+ {store.positiveRatio}% 긍정비율
+
+
+ {store.nearbyStation}
+
@@ -49,7 +51,7 @@ const StorePreviewContainer = styled.div`
align-items: center;
text-align: center;
padding-bottom: 20px;
- border-bottom: 1px solid ${Orange};
+ border-bottom: 1px solid ${Grey};
`;
const ImageContainer = styled.div`
@@ -69,6 +71,13 @@ const ImageBox = styled.div`
max-width: 400px;
object-fit: cover;
}
+
+ @media screen and (max-width: 768px) {
+ border-radius: 0px;
+ & > img {
+ border-radius: 0px;
+ }
+ }
`;
const NameAndCategoryBox = styled.div`
@@ -80,6 +89,13 @@ const NameAndCategoryBox = styled.div`
& > h1 {
font-weight: 700;
}
+
+ @media screen and (max-width: 768px) {
+ & > h1 {
+ font-size: 24px;
+ font-weight: 700;
+ }
+ }
`;
const ContentsBox = styled.div`
@@ -95,9 +111,8 @@ const ContentsBox = styled.div`
const RatingBox = styled.div`
display: flex;
- flex-direction: row;
- align-items: center;
- gap: 20px;
+ flex-direction: column;
+ gap: 10px;
& > div > svg {
width: 20px;
@@ -110,13 +125,6 @@ const RatingBox = styled.div`
flex-direction: row;
align-items: center;
gap: 10px;
- & > div > p {
- font-size: 18px;
- display: flex;
- justify-content: center;
- align-items: center;
- text-align: center;
- }
}
& > p {
@@ -125,28 +133,19 @@ const RatingBox = styled.div`
color: ${DarkGrey};
}
- & > p > span {
- font-size: 18px;
- font-weight: 700;
- color: ${Orange};
- }
-
@media screen and (max-width: 1024px) {
flex-direction: column;
& > div {
display: flex;
- height: 30px;
+ height: 20px;
gap: 10px;
flex-direction: row;
- align-items: center;
- text-align: center;
-
+ justify-content: flex-start;
+ align-items: flex-start;
+ text-align: left;
& > div > p {
- font-size: 18px;
+ font-size: 16px;
display: flex;
- justify-content: center;
- align-items: center;
- text-align: center;
}
}
}
@@ -164,3 +163,24 @@ const StarBox = styled.div`
height: 16px;
}
`;
+
+const RatioText = styled.span`
+ color: ${Orange};
+ font-weight: 700;
+`;
+
+const CategoryText = styled.p`
+ color: ${DarkGrey};
+`;
+
+const StationBox = styled.div`
+ & > svg {
+ color: ${LightGrey};
+ }
+`;
+
+const RiviewCountText = styled.p`
+ @media screen and (max-width: 1024px) {
+ display: none;
+ }
+`;
From b09f3bf3a0d14bf6bd21f18998be2e632c0ceab3 Mon Sep 17 00:00:00 2001
From: "songhj10207@naver.com"
Date: Sun, 17 Nov 2024 16:40:59 +0900
Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=EC=83=81=EC=84=B8=ED=8E=98=EC=9D=B4?=
=?UTF-8?q?=EC=A7=80=20=EB=B6=81=EB=A7=88=ED=81=AC=20=EB=B0=98=EC=9D=91?=
=?UTF-8?q?=ED=98=95=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/StoreDetailPage.jsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/pages/StoreDetailPage.jsx b/src/pages/StoreDetailPage.jsx
index 63bc2c6..06726b3 100644
--- a/src/pages/StoreDetailPage.jsx
+++ b/src/pages/StoreDetailPage.jsx
@@ -140,7 +140,7 @@ const StyledRightContainer = styled.div`
const BookmarkBox = styled.div`
width: 100%;
height: 80px;
- margin-top: 50px;
+ margin-top: 60px;
padding: 20px;
border: 1px solid ${Grey};
border-radius: 10px;
@@ -158,6 +158,11 @@ const BookmarkBox = styled.div`
cursor: pointer;
}
}
+
+ @media screen and (max-width: 1024px) {
+ margin-top: 0px;
+ padding: 10px;
+ }
`;
const ButtonBox = styled.div`