File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 11import { useQuery } from '@tanstack/react-query'
2- import { $fetch } from '@/service/http '
2+ import { $fetch as publicFetch } from 'ofetch '
33
44type GoalType = 'donation' | 'github_stars' | ( string & { } )
55
@@ -30,8 +30,10 @@ export function useCurrentGoal() {
3030 return useQuery ( {
3131 queryKey : [ 'current-goal' ] ,
3232 queryFn : async ( ) => {
33- const response = await $fetch < Goal > ( 'https://donate.pasarguard.org/api/v1/goal/current' , {
33+ const response = await publicFetch < Goal > ( 'https://donate.pasarguard.org/api/v1/goal/current' , {
3434 method : 'GET' ,
35+ referrerPolicy : 'no-referrer' ,
36+ credentials : 'omit' ,
3537 } )
3638 return response
3739 } ,
@@ -44,8 +46,10 @@ export function useAllGoals() {
4446 return useQuery ( {
4547 queryKey : [ 'all-goals' ] ,
4648 queryFn : async ( ) => {
47- const response = await $fetch < GoalsResponse > ( 'https://donate.pasarguard.org/api/v1/goal/list' , {
49+ const response = await publicFetch < GoalsResponse > ( 'https://donate.pasarguard.org/api/v1/goal/list' , {
4850 method : 'GET' ,
51+ referrerPolicy : 'no-referrer' ,
52+ credentials : 'omit' ,
4953 } )
5054 return response
5155 } ,
You can’t perform that action at this time.
0 commit comments