-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: 어셋 추가 * chore: 더미 쌓기 * chore: 바텀시트 중앙정렬 * feat: 공공api 연결 및 에러 throw * feat: emptyview 공통컴포넌트 분리 * feat: emptyview 공통컴포넌트 분리(2) * chore: 바텀시트 스타일 수정 * feat: 저장한 여행지 버튼 클릭 플로우 구현 * feat: 바텀시트 공통(content 1개)빼기, 저장한여행지 목록 구현 * chore: 바텀시트 애니메이션 추가 * fix: 타입 에러 해결 * fix: 타입 에러 해결 * fix: api response type 변경에 따른 타입 수정 * feat: 저장한 여행지 마커 초기화 로직
- Loading branch information
Showing
23 changed files
with
547 additions
and
135 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** 공통정보 조회 API */ | ||
|
||
import { detailCommon1Res } from '@/types/detailCommon1'; | ||
import { Response } from '@/types/public'; | ||
|
||
import { publicDataClient } from '..'; | ||
|
||
interface detailCommon1Params { | ||
numOfRows: number; | ||
pageNo: number; | ||
MobileOS: 'IOS' | 'AND' | 'WIN' | 'ETC'; | ||
contentId: number; | ||
defaultYN: 'Y' | 'N'; | ||
firstImageYN: 'Y' | 'N'; | ||
addrinfoYN: 'Y' | 'N'; | ||
mapinfoYN: 'Y' | 'N'; | ||
} | ||
|
||
export const getDetailCommon1 = async (paramsInfo: detailCommon1Params) => { | ||
let params = `MobileApp=UNITRIP&_type=json&serviceKey=${import.meta.env.VITE_PUBLIC_DATA_SERVICE_KEY}`; | ||
|
||
for (const [key, value] of Object.entries(paramsInfo)) { | ||
params += `&${key}=${value}`; | ||
} | ||
|
||
const { | ||
data: { | ||
response: { | ||
body: { items }, | ||
}, | ||
}, | ||
} = await publicDataClient.get<Response<detailCommon1Res[]>>( | ||
`/detailCommon1?${params}`, | ||
); | ||
|
||
return items; | ||
}; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,34 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { MypageHeartIcon } from '@/assets/icon'; | ||
import { COLORS, FONTS } from '@/styles/constants'; | ||
|
||
const EmptyFavList = () => { | ||
return ( | ||
<div css={emptyContainer}> | ||
<MypageHeartIcon /> | ||
<p css={emptyText}> | ||
아직 저장한 여행지가 없어요 | ||
<br /> | ||
유니트립 여행지를 더 둘러볼까요? | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EmptyFavList; | ||
|
||
const emptyContainer = css` | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
`; | ||
|
||
const emptyText = css` | ||
padding: 1.6rem 0 2.8rem; | ||
color: ${COLORS.gray9}; | ||
text-align: center; | ||
${FONTS.Body4}; | ||
`; |
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,22 @@ | ||
export interface detailCommon1Res { | ||
cat2: string; | ||
cat3: string; | ||
tel: string; | ||
modifiedtime: string; | ||
sigungucode: string; | ||
contentid: string; | ||
mlevel: string; | ||
title: string; | ||
addr1: string; | ||
addr2: string; | ||
areacode: string; | ||
booktour: string; | ||
cat1: string; | ||
firstimage2: string; | ||
mapx: string; | ||
mapy: string; | ||
cpyrhtDivCd: string; | ||
contenttypeid: string; | ||
createdtime: string; | ||
firstimage: string; | ||
} |
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 |
---|---|---|
@@ -1,39 +1,23 @@ | ||
export interface locationBasedList1Res { | ||
tel: 'string'; | ||
title: 'string'; | ||
firstimage: 'string'; | ||
createdtime: 'string'; | ||
dist: 'string'; | ||
cat2: 'string'; | ||
contentid: 'string'; | ||
contenttypeid: 'string'; | ||
addr1: 'string'; | ||
addr2: 'string'; | ||
areacode: 'string'; | ||
booktour: 'string'; | ||
cat1: 'string'; | ||
mlevel: 'string'; | ||
modifiedtime: 'string'; | ||
sigungucode: 'string'; | ||
cpyrhtDivCd: 'string'; | ||
firstimage2: 'string'; | ||
mapx: 'string'; | ||
mapy: 'string'; | ||
cat3: 'string'; | ||
} | ||
|
||
export interface getLocationBasedList1Res { | ||
header: { | ||
resultMsg: 'string'; | ||
resultCode: 'string'; | ||
}; | ||
body: { | ||
pageNo: number; | ||
totalCount: number; | ||
items: | ||
| { | ||
item: locationBasedList1Res[]; | ||
} | ||
| ''; | ||
}; | ||
tel: string; | ||
title: string; | ||
firstimage: string; | ||
createdtime: string; | ||
dist: string; | ||
cat2: string; | ||
contentid: string; | ||
contenttypeid: string; | ||
addr1: string; | ||
addr2: string; | ||
areacode: string; | ||
booktour: string; | ||
cat1: string; | ||
mlevel: string; | ||
modifiedtime: string; | ||
sigungucode: string; | ||
cpyrhtDivCd: string; | ||
firstimage2: string; | ||
mapx: string; | ||
mapy: string; | ||
cat3: string; | ||
} |
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
Oops, something went wrong.