Skip to content

Commit

Permalink
Fix: 추천 정보
Browse files Browse the repository at this point in the history
  • Loading branch information
goeun208 committed Mar 15, 2024
1 parent 06522e7 commit 4d51d6d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/apis/getGroupBestRegionPlace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const getGroupBestRegionPlace = async (
local: string,
keyword: KeywordType,
): Promise<GetGroupBestRegionPlaceRes> => {
console.log(x, y, local, keyword);
try {
console.log('추천 장소 정보: ', x, y, local, keyword);
const res = await customedAxios.get(
`${process.env.NEXT_PUBLIC_BASE_URL}/group/best-region/place?x=${x}&y=${y}&local=${local}&keyword=${keyword}`,
);
Expand Down
6 changes: 5 additions & 1 deletion src/components/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ const Main = ({ id }: MainProps) => {
)}

<div className="w-full h-full bg-light_orange p-8">
<Place lat={lat.toString()} lng={lng.toString()} local={local} />
{groupData ? (
<Place lat={lat.toString()} lng={lng.toString()} local={local} />
) : (
<div>데이터를 불러올 수 없습니다.</div>
)}
</div>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/components/place/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ const Place = ({ lng, lat, local }: PlaceProps) => {
}
}, [chip]);
const { data: bestPlaceData } = useGetGroupBestRegionPlace(token, lat, lng, local, keyword);
console.log(bestPlaceData);
console.log(local, '의 카테고리:', category, '키워드: ', keyword, '추천데이터:', bestPlaceData);

const onChipClick = (chip: keyof typeof ChipList) => {
console.log(chip);
console.log('chip', chip);
setChip(chip);
};
useEffect(() => {
Expand Down

0 comments on commit 4d51d6d

Please sign in to comment.