Skip to content

Commit

Permalink
Merge pull request #37 from delicious-algorithme/dev
Browse files Browse the repository at this point in the history
fix : 디테일 페이지 수정 필터링 레이아웃 구현 및 파일 구조 변경
  • Loading branch information
Songhyejeong authored Sep 9, 2024
2 parents 3737bab + 28098a1 commit 75f740f
Show file tree
Hide file tree
Showing 30 changed files with 1,268 additions and 532 deletions.
41 changes: 41 additions & 0 deletions public/data/store.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[
{
"storeId": 1,
"keyword": "성수동 일식",
"name": "지금이밤 성수본점",
"storeLink": "https://map.naver.com/p/search/%EC%84%B1%EC%88%98%EB%8F%99%20%EC%9D%BC%EC%8B%9D/place/1883905907?c=14.00,0,0,0,dh&placePath=%3Fentry%253Dbmp%2526n_ad_group_type%253D10%2526n_query%253D%2525EC%252584%2525B1%2525EC%252588%252598%2525EB%25258F%252599%2525EC%25259D%2525BC%2525EC%25258B%25259D",
"category": "이자카야",
"reviewsCount": 999,
"address": "서울 성동구 성수이로 127 ADLV성수빌딩 202호",
"nearbyStation": "2호선 성수역 2번 출구에서 217m",
"phone": "0507-1315-5511",
"businessHours": [
"금: 16:00 - 01:00 23:30 라스트오더",
"토: 16:00 - 01:00 23:30 라스트오더",
"일: 16:00 - 01:00 23:30 라스트오더",
"월: 16:00 - 01:00 23:30 라스트오더",
"화: 16:00 - 01:00 23:30 라스트오더",
"수: 16:00 - 01:00 23:30 라스트오더",
"목: 16:00 - 01:00 23:30 라스트오더"
],
"latitude": 37.54629003,
"longitude": 127.0573991,
"menuAndPrice": "계절 숙성 사시미 (소) - 50,000원, 홍가리비찜 - 25,000원, 미나리조개탕 - 23,000원",
"imageUrl": "https://search.pstatic.net/common/?autoRotate=true&type=w560_sharpen&src=https%3A%2F%2Fldb-phinf.pstatic.net%2F20240721_60%2F1721548556083Bv2fm_PNG%2F%25C8%25AD%25B8%25E9_%25C4%25B8%25C3%25B3_2024-07-20_224200.png",
"positiveKeywords": "신선함, 가성비 좋음, 다양한 메뉴",
"negativeKeywords": "주차 불편, 웨이팅 있음, 계단이 가팔라 불편",
"reviewSummary": "신선한 숙성 사시미와 다양한 안주 메뉴가 인상적이며, 가성비가 뛰어나다는 평가가 많습니다. 다만 주차와 웨이팅에 대한 불편함을 언급하는 리뷰도 존재합니다.",
"rating": 4.5,
"positiveRatio": 80,
"negativeRatio": 10,
"neutralRatio": 10,
"isSoloDining": true,
"isParking": true,
"isWaiting": true,
"mainMenu": "치즈돈까스 - 9,000원, 비빔냉면 - 7,000원, 고구마돈까스 - 8,000원",
"isPetFriendly": true,
"parkingTip": "근처 유료 주차장 이용 권장",
"waitingTip": "빠르게 방문하거나 예약 권장",
"recommendMenu": "계절 숙성 사시미 - 다양한 제철 생선으로 구성된 푸짐한 사시미로 신선함이 돋보이며, 사시미에 대한 만족도가 높습니다."
}
]
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { GlobalStyle } from './styles';
import { Route, Routes, BrowserRouter } from 'react-router-dom';
import { Main, MapWithDetail, WebMap } from './pages';
import { Main, WebMap, StoreDetailPage } from './pages';
import './App.css';

function App() {
Expand All @@ -13,7 +13,7 @@ function App() {
<Route path="/" element={<Main />} />
<Route path="/webmap" element={<WebMap />} />
<Route path="/webmap/storeList/:keyword" element={<WebMap />} />
<Route path="/webmap/storeDetail/:id" element={<MapWithDetail />} />
<Route path="/webmap/storeDetail/:id" element={<StoreDetailPage />} />
</Routes>
</BrowserRouter>
</div>
Expand Down
17 changes: 17 additions & 0 deletions src/apis/api/getStoreAll.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defaultInstance } from '../utils/instance';

export const getStoreAll = async (params) => {
try {
const { data, status } = await defaultInstance.get(`/api/stores/all`, { params: params });
return {
data,
status,
};
} catch (e) {
console.log(e);
return {
error: e.response.data.detail,
status: e.response.status,
};
}
};
18 changes: 18 additions & 0 deletions src/apis/api/getStoreDetail.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defaultInstance } from '../utils/instance';

// 가게 상세 정보
export const getStoreDetail = async (id) => {
try {
const { data, status } = await defaultInstance.get(`/api/stores/${id.storeId}`);
return {
data,
status,
};
} catch (e) {
console.log(e);
return {
error: e.response.data.detail,
status: e.response.status,
};
}
};
19 changes: 19 additions & 0 deletions src/apis/api/getStoreList.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defaultInstance } from '../utils/instance';

//검색 가게 리스트
export const getStoreList = async (params) => {
console.log(params);
try {
const { data, status } = await defaultInstance.get(`/api/stores/search`, { params: params });
return {
data,
status,
};
} catch (e) {
console.log(e);
return {
error: e.response.data.detail,
status: e.response.status,
};
}
};
52 changes: 0 additions & 52 deletions src/apis/api/storeList.jsx

This file was deleted.

12 changes: 12 additions & 0 deletions src/assets/Icon/Clock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/Icon/Dog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/Icon/Insight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/Icon/PakingTip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/Icon/Parking.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/assets/Icon/Recommended.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/Icon/ReviewTip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/Icon/SoloDining.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/Icon/WaitingTip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/common/StoreDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ReactComponent as Close } from '../../assets/Icon/Close.svg';
import { ReactComponent as PathMobile } from '../../assets/Icon/Path_Mobile.svg';
import { ReactComponent as SeeMore } from '../../assets/Icon/SeeMore.svg';
import { useParams } from 'react-router-dom';
import { getStoreDetail } from '../../apis/api/storeList';
import { getStoreDetail } from '../../apis/api/getStoreDetail';
import { useStoreList } from '../../store';

const StoreDetail = () => {
Expand Down
Loading

0 comments on commit 75f740f

Please sign in to comment.