generated from mbti-nf-team/nextjs-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 장소 상세 api node.js bff로 마이그레이션 (#213)
- Loading branch information
1 parent
3680528
commit 309cea0
Showing
12 changed files
with
98 additions
and
26 deletions.
There are no files selected for viewing
File renamed without changes.
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
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,20 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
import { fetchPlaceDetailV2 } from '@/lib/apis/search'; | ||
import { SearchPlace } from '@/lib/types/search'; | ||
|
||
const TEN_MINUTES = 600000; | ||
|
||
function useGetSearchPlace({ | ||
placeId, sessionToken, | ||
}: { placeId?: string; sessionToken?: string; }) { | ||
const query = useQuery<SearchPlace>(['placeDetailV2', placeId], () => fetchPlaceDetailV2({ placeId: placeId as string, sessionToken }), { | ||
enabled: !!placeId, | ||
staleTime: TEN_MINUTES, | ||
cacheTime: TEN_MINUTES, | ||
}); | ||
|
||
return query; | ||
} | ||
|
||
export default useGetSearchPlace; |
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
309cea0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
offbeat – ./
unnamed-k-place-frontend.vercel.app
offbeat-git-main-nf-team.vercel.app
offbeat-nf-team.vercel.app
offbeat.place
www.offbeat.place