-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 데이터 추가 mock api 연결 * refactor: 인증 필요 없는 기능 client 변경 * feat: mse 동영상, 리뷰 기능 구현 (#472) * refactor: api 훅 함수로 분리, 적용 (#472) * refactor: 쓰지 않는 파일 삭제 (#472) * fix: console log 삭제 (#472) * Squashed commit of the following: commit 6e00687 Author: Jeremy <[email protected]> Date: Fri Sep 15 17:18:33 2023 +0900 bug: 옵션관련 ux 개선 (#474) * fix: 검색창 옵션 수정 (#473) * fix: 지도 줌 limit 설정 (#473) * fix: 모바일 환경에서 거리순으로 설정 (#473) * design: 오버레이 마커 디자인 개선 (#473) * fix: 오류 수정 (#476)
- Loading branch information
Showing
58 changed files
with
23,428 additions
and
1,269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import axios from 'axios'; | ||
|
||
export const apiUserClient = axios.create({ | ||
baseURL: `${process.env.BASE_URL}`, | ||
headers: { | ||
'Content-type': 'application/json', | ||
}, | ||
withCredentials: true, | ||
}); | ||
|
||
export const apiClient = axios.create({ | ||
baseURL: `${process.env.BASE_URL}`, | ||
headers: { | ||
'Content-type': 'application/json', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { apiClient } from './apiClient'; | ||
import type { Celeb } from '~/@types/celeb.types'; | ||
|
||
export const getCelebs = async () => { | ||
const response = await apiClient.get<Celeb[]>('/celebs'); | ||
return response.data; | ||
}; | ||
|
||
export const getCelebVideo = async (celebId: string) => { | ||
const response = await apiClient.get(`/videos?celebId=${celebId}`); | ||
return response.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import getQueryString from '~/utils/getQueryString'; | ||
import { apiClient } from './apiClient'; | ||
import type { RestaurantListData } from '~/@types/api.types'; | ||
import type { RestaurantsQueryParams } from '~/@types/restaurant.types'; | ||
|
||
export const getRestaurants = async (queryParams: RestaurantsQueryParams) => { | ||
const queryString = getQueryString(queryParams); | ||
const response = await apiClient.get<RestaurantListData>(`/restaurants?${queryString}`); | ||
|
||
return response.data; | ||
}; | ||
|
||
export const getRestaurantDetail = async (restaurantId: string, celebId: string) => { | ||
const response = await apiClient.get(`/restaurants/${restaurantId}?celebId=${celebId}`); | ||
return response.data; | ||
}; | ||
|
||
export const getNearByRestaurant = async (restaurantId: string) => { | ||
const response = await apiClient.get(`/restaurants/${restaurantId}/nearby`); | ||
return response.data; | ||
}; | ||
|
||
export const getRestaurantVideo = async (restaurantId: string) => { | ||
const response = await apiClient.get(`/videos?restaurantId=${restaurantId}`); | ||
return response.data; | ||
}; | ||
|
||
export const postRevisedInfo = async ({ | ||
restaurantId, | ||
data, | ||
}: { | ||
restaurantId: number; | ||
data: { contents: string[] }; | ||
}) => { | ||
const response = await apiClient.post(`/restaurants/${restaurantId}/correction`, data); | ||
return response.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { RestaurantReviewPatchBody, RestaurantReviewPostBody } from '~/@types/api.types'; | ||
import { apiClient, apiUserClient } from './apiClient'; | ||
|
||
export const getRestaurantReview = async (id: string) => { | ||
const response = await apiClient.get(`/reviews?restaurantId=${id}`); | ||
return response.data; | ||
}; | ||
|
||
export const postRestaurantReview = async (body: RestaurantReviewPostBody) => { | ||
const response = await apiUserClient.post(`/reviews`, body); | ||
return response; | ||
}; | ||
|
||
export const deleteRestaurantReview = async (reviewId: number) => { | ||
const response = await apiUserClient.delete(`/reviews/${reviewId}`); | ||
return response; | ||
}; | ||
|
||
export const patchRestaurantReview = async ({ | ||
reviewId, | ||
body, | ||
}: { | ||
reviewId: number; | ||
body: RestaurantReviewPatchBody; | ||
}) => { | ||
const response = await apiUserClient.patch(`/reviews/${reviewId}`, body); | ||
return response; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { apiUserClient } from './apiClient'; | ||
import type { Oauth } from '~/@types/oauth.types'; | ||
|
||
export const getAccessToken = async (type: Oauth, code: string) => { | ||
const response = await apiUserClient.get(`/oauth/login/${type}?code=${code}`); | ||
return response.data; | ||
}; | ||
|
||
export const getLogout = async (type: Oauth) => { | ||
const response = await apiUserClient.get(`/oauth/logout/${type}`); | ||
return response.data; | ||
}; | ||
|
||
export const getProfile = async () => { | ||
const response = await apiUserClient.get('/members/my'); | ||
return response.data; | ||
}; | ||
|
||
export const getRestaurantWishList = async () => { | ||
const response = await apiUserClient.get('/restaurants/like'); | ||
return response.data; | ||
}; | ||
|
||
export const postRestaurantLike = async (restaurantId: number) => { | ||
await apiUserClient.post(`/restaurants/${restaurantId}/like`); | ||
}; | ||
|
||
export const deleteUserData = async (type: Oauth) => { | ||
const response = await apiUserClient.delete(`/oauth/withdraw/${type}`); | ||
return response.data; | ||
}; |
80 changes: 0 additions & 80 deletions
80
frontend/src/components/@common/BottomSheet/BottomSheet.tsx
This file was deleted.
Oops, something went wrong.
59 changes: 0 additions & 59 deletions
59
frontend/src/components/@common/BottomSheet/BottomSheetHeader.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.