Skip to content

Commit 3a5eea2

Browse files
authored
Merge pull request #43 from DaengPlace/Design/#36
Design/#36 : 영수증 촬영 페이지, 수정사항 반영
2 parents ab23a05 + a2068e6 commit 3a5eea2

File tree

17 files changed

+249
-96
lines changed

17 files changed

+249
-96
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"react-dom": "19.0.0-rc-66855b96-20241106",
2525
"react-hook-form": "^7.53.2",
2626
"react-icons": "^5.3.0",
27+
"react-webcam": "^7.2.0",
2728
"styled-components": "^6.1.13",
2829
"styled-icons": "^10.47.1",
2930
"zustand": "^5.0.1"

src/app/ClientLayout.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default function ClientLayout({ children }) {
3030
"/recommend/usertest",
3131
"/reviews/reviewScan",
3232
"/reviews/reviewsInput",
33+
"/reviews/receiptCapture",
3334
];
3435
const noHeaderNavPaths = [
3536
"/main",

src/app/place/page.jsx

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const PlacePage = () => {
2121
const [hoveredCategory, setHoveredCategory] = useState(null);
2222
const [isBottomSheetOpen, setIsBottomSheetOpen] = useState(false);
2323
const [hasMounted, setHasMounted] = useState(false);
24-
const [isLocationPermissionGranted, setIsLocationPermissionGranted] = useState(false);
2524
const router = useRouter();
2625

2726
useEffect(() => {
@@ -32,16 +31,20 @@ const PlacePage = () => {
3231
return null;
3332
}
3433

34+
const handleImageClick = () => {
35+
router.push(`/place/placesearch`);
36+
}
3537
return (
3638
<Container>
3739
<Banner />
3840
<ImagesSection>
39-
<ImageWrapper onClick={() => setIsBottomSheetOpen(true)}>
41+
<ImageWrapper onClick={handleImageClick}>
4042
<Image
4143
src="/assets/place/banner3.svg"
4244
alt="내 주변 동반가능시설"
4345
width={270}
4446
height={118}
47+
layout="responsive"
4548
style={{
4649
objectFit: "cover",
4750
borderRadius: "20px",
@@ -52,12 +55,13 @@ const PlacePage = () => {
5255
<div>찾아보기</div>
5356
</OverlayText>
5457
</ImageWrapper>
55-
<ImageWrapper onClick={() => router.push('/recommend')}>
58+
<ImageWrapper>
5659
<Image
5760
src="/assets/place/banner2.svg"
5861
alt="성향별 추천 시설"
5962
width={270}
6063
height={118}
64+
layout="responsive"
6165
style={{
6266
objectFit: "cover",
6367
borderRadius: "20px",
@@ -70,6 +74,7 @@ const PlacePage = () => {
7074
</ImageWrapper>
7175
</ImagesSection>
7276

77+
<CategoryWrapper>
7378
<CategorySection>
7479
<h2>카테고리별 <span>인기 리뷰</span> 🔥</h2>
7580
<CategorySelector
@@ -81,25 +86,11 @@ const PlacePage = () => {
8186
<Hr />
8287
<ReviewList reviews={reviews} />
8388
</CategorySection>
89+
</CategoryWrapper>
8490
<Hr2 />
8591
<FooterWrapper>
8692
<Footer />
8793
</FooterWrapper>
88-
{isBottomSheetOpen && (
89-
<BottomSheet
90-
title={Permission.args.title}
91-
content={Permission.args.content}
92-
cancelText={Permission.args.cancelText}
93-
confirmText={Permission.args.confirmText}
94-
onClose={() => setIsBottomSheetOpen(false)}
95-
onConfirm={() => {
96-
setIsLocationPermissionGranted(true);
97-
setIsBottomSheetOpen(false);
98-
router.push(`place/placesearch?permissionGranted=true`);
99-
}}
100-
101-
/>
102-
)}
10394
</Container>
10495
);
10596
};
@@ -109,21 +100,24 @@ export default PlacePage;
109100
const Container = styled.div`
110101
display: flex;
111102
flex-direction: column;
103+
width : 100%;
112104
min-height: 100vh;
113105
margin: 0 auto;
114-
padding: 20px;
115106
background-color: #f8f8f8;
107+
position: relative;
116108
`;
117109

118110
const ImagesSection = styled.section`
119111
display: flex;
120-
justify-content: space-between;
112+
justify-content: center;
121113
gap: 20px;
122-
margin-top: 20px;
114+
height: 100%;
115+
position: relative;
116+
margin: 20px auto;
117+
padding : 0 1.25rem;
123118
`;
124119

125120
const ImageWrapper = styled.div`
126-
position: relative;
127121
cursor: pointer;
128122
`;
129123

@@ -137,13 +131,19 @@ const OverlayText = styled.div.withConfig({
137131
font-weight: bold;
138132
color: ${({ dark }) => (dark ? "white" : "black")};
139133
padding: 5px 10px;
134+
135+
@media (max-width: 500px) {
136+
font-size : 10px;
137+
}
140138
`;
141139

140+
const CategoryWrapper = styled.div`
141+
padding: 0 1.25rem;
142+
`
142143
const CategorySection = styled.section`
143-
margin-top: 10px;
144144
background: #fff;
145-
padding: 20px;
146-
border-radius: 20px;
145+
padding: 1.25rem;
146+
border-radius: 1.25rem;
147147
border: 1px solid #ababab;
148148
h2 {
149149
margin-bottom: 20px;
@@ -155,8 +155,7 @@ const CategorySection = styled.section`
155155
`;
156156

157157
const FooterWrapper = styled.div`
158-
margin-top: auto;
159-
width: 100%;
160-
margin-left: -20px;
161-
padding: 10px 0;
158+
margin-top: 0.75rem;
159+
width: 100%;
160+
padding: 0 1.25rem;
162161
`;

src/app/place/placedetail/page.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ActualPlaceDetailPage = () => {
3131
const [center, setCenter] = useState(null);
3232
const [address, setAddress] = useState("");
3333
const [isLiked, setIsLiked] = useState(false);
34-
const [uploadedFile, setUploadedFile] = useState(null); // 파일 상태 관리
34+
const [uploadedFile, setUploadedFile] = useState(null);
3535

3636
const selectedCard = cards.find((card) => card.id === id);
3737
if (!selectedCard) {
@@ -50,6 +50,7 @@ const ActualPlaceDetailPage = () => {
5050
)}&key=${process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY}`
5151
);
5252
const data = await response.json();
53+
5354
if (data.status === "OK" && data.results.length > 0) {
5455
const { lat, lng } = data.results[0].geometry.location;
5556
setCenter({ lat, lng });
@@ -140,7 +141,7 @@ const ActualPlaceDetailPage = () => {
140141
onClose={() => setIsReviewBottomSheetOpen(false)}
141142
onConfirm={() => {
142143
setIsReviewBottomSheetOpen(false);
143-
router.push("/reviews/reviewScan");
144+
router.push("/reviews/receiptCapture");
144145
}}
145146
cancelText="사진 업로드"
146147
confirmText="영수증 촬영"

src/app/place/placemap/page.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const ActualPlaceMap = () => {
6363
const handleGunguChange = (event) => setSelectedGungu(event.target.value);
6464

6565
const handleBackToList = () => {
66-
router.push("/place/placesearch?permissionGranted=true");
66+
router.push("/place/placesearch");
6767
};
6868

6969
const handleCategoryClick = (category) => {

src/app/place/placesearch/page.jsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const ActualPlaceSearchPage = () => {
4141
const bottomRef = useRef(null);
4242
const scrollableRef = useRef(null);
4343
const searchParams = useSearchParams();
44-
const permissionGranted = searchParams.get("permissionGranted") === "true";
4544

4645
const handleOpenBottomSheet = () => setIsBottomSheetOpen(true);
4746
const handleCloseBottomSheet = () => setIsBottomSheetOpen(false);
@@ -90,7 +89,7 @@ const ActualPlaceSearchPage = () => {
9089
};
9190

9291
useEffect(() => {
93-
if (permissionGranted && navigator.geolocation) {
92+
if (navigator.geolocation) {
9493
navigator.geolocation.getCurrentPosition(
9594
(position) => {
9695
const { latitude, longitude } = position.coords;
@@ -101,7 +100,7 @@ const ActualPlaceSearchPage = () => {
101100
}
102101
);
103102
}
104-
}, [permissionGranted]);
103+
}, []);
105104

106105
const handleMapView = () => {
107106
if (userLocation) {
@@ -166,14 +165,12 @@ const ActualPlaceSearchPage = () => {
166165

167166
return (
168167
<>
169-
<HeaderWrapper>
170168
<Header
171169
title="동반가능시설 검색"
172170
showFavoriteIcon={WithMapIcon.args.showFavoriteIcon}
173171
showHomeIcon={WithMapIcon.args.showHomeIcon}
174172
showMapIcon={WithMapIcon.args.showMapIcon}
175173
/>
176-
</HeaderWrapper>
177174
<ScrollableContainer id="scrollable-container" ref={scrollableRef}>
178175
<SearchBar onClick={handleOpenBottomSheet} />
179176
<Tabs
@@ -241,12 +238,6 @@ const ScrollableContainer = styled.div`
241238
display: none;
242239
}
243240
`;
244-
const HeaderWrapper = styled.div`
245-
position: fixed;
246-
top: 0;
247-
z-index: 1000;
248-
background-color: white;
249-
`;
250241
const MapButton = styled.button`
251242
position: fixed;
252243
bottom: ${({ bottom }) => `${bottom}px`};

src/app/reviews/page.jsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ const ReviewPage = () => {
4646

4747
return (
4848
<>
49-
<HeaderWrapper>
5049
<Header
5150
title="리뷰 전체보기"
5251
showCloseButton={true}
5352
/>
54-
</HeaderWrapper>
5553
<Container ref={containerRef}>
5654
<PageHeader title="92버터샵" reviewCount={reviews.length} />
5755
<ReviewSummary
@@ -74,13 +72,6 @@ const ReviewPage = () => {
7472

7573
export default ReviewPage;
7674

77-
const HeaderWrapper = styled.div`
78-
position: fixed;
79-
top: 0;
80-
z-index: 1000;
81-
background-color: white;
82-
`;
83-
8475
const Container = styled.div`
8576
padding: 16px;
8677
padding-top: 70px;

0 commit comments

Comments
 (0)