-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from Strong-Potato/137-feat-create-home-recom…
…mend-data Feat: create home recommend data
- Loading branch information
Showing
34 changed files
with
1,758 additions
and
1,177 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import axios from 'axios'; | ||
|
||
import {SearchItemType} from '@/types/home'; | ||
|
||
export async function getSearchData( | ||
page: number, | ||
areaCode: number, | ||
sigunguCode: number, | ||
placeTypeId: number, | ||
keyword: string, | ||
sort: string, | ||
categoryCode: string, | ||
) { | ||
const searchData: SearchItemType = await axios.get('/api/places/search', { | ||
params: { | ||
page: page, | ||
size: 20, | ||
areaCode: areaCode, | ||
sigunguCode: sigunguCode, | ||
placeTypeId: placeTypeId, | ||
keyword: keyword, | ||
sort: sort, | ||
categoryCode: categoryCode, | ||
}, | ||
}); | ||
return searchData; | ||
} |
23 changes: 8 additions & 15 deletions
23
src/components/Home/RecommendedItemList/RecommendedItem/RecommendedItem.tsx
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
280 changes: 241 additions & 39 deletions
280
src/components/Home/RecommendedItemList/RecommendedItemList.tsx
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.