generated from api-platform/api-platform
-
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.
Fix changing locale for prismic data
- Loading branch information
Stephane MEAUDRE
committed
Mar 22, 2024
1 parent
0c4d702
commit f30372f
Showing
9 changed files
with
57 additions
and
48 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 |
---|---|---|
@@ -1,19 +1,11 @@ | ||
export const useSearchRequest = async (searchTerms: string): Promise<any> => { | ||
export const useSearchRequest = async (searchTerms: Ref<string>): Promise<any> => { | ||
const endpoint: string = '/search'; | ||
|
||
const {data, pending, error, status} = useAsyncData( | ||
|
||
() => useCustomFetch<[SearchDsoItem|SearchConstellationItem]>(endpoint, { | ||
method: 'POST', | ||
body: { | ||
terms: searchTerms | ||
} | ||
} | ||
) | ||
return useCustomFetch<[SearchDsoItem | SearchConstellationItem]>(endpoint, { | ||
method: 'POST', | ||
body: { | ||
terms: searchTerms | ||
}, | ||
watch: [searchTerms] | ||
} | ||
); | ||
|
||
console.log(status.value); | ||
console.log(data.value); | ||
|
||
return {data, pending, error, status}; | ||
} |
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