You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a small project using supabase.
It have a download count that will increase . The download count increase in the detail page but not in the list page in deployment even when the page is refresh. But everything work okay in local.
I cannot seem to be able to solve it , it has never happened to me before and cannot seem to find other facing the same issue. Is there something that I didn't know about NextJs in deployment ?
I deployed in on vercel and also used TanStack Query for that. Here is my code for example
const{data: sheetLists,
isLoading,
isError,}=useFetchData<SheetResponse[]>({queryKey: ["sheets"],apiFunction: ()=>getSheets(),});//this is how I fetch the data and this is the setup of hookimport{useQuery,QueryKey,UseQueryOptions}from"react-query";interfaceUseFetchDataArgs<T>{queryKey: QueryKey;apiFunction: (...args: any[])=>Promise<{data: T}>;options?: UseQueryOptions<T>;}constfetchData=async<T>(apiFunction: (...args: any[])=>Promise<{data: T}>,)=>{constresponse=awaitapiFunction();returnresponse.data;};constuseFetchData=<T>({
queryKey,
apiFunction,
options ={},}: UseFetchDataArgs<T>)=>{returnuseQuery<T>(queryKey,()=>fetchData(apiFunction),{
...options,});};exportdefaultuseFetchData;
I did also notice that when I inspect the responses, the api is responsed with 304 Not Modified.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I have a small project using supabase.
It have a download count that will increase . The download count increase in the detail page but not in the list page in deployment even when the page is refresh. But everything work okay in local.
I cannot seem to be able to solve it , it has never happened to me before and cannot seem to find other facing the same issue. Is there something that I didn't know about NextJs in deployment ?
I deployed in on vercel and also used TanStack Query for that. Here is my code for example
I did also notice that when I inspect the responses, the api is responsed with
304 Not Modified
.Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions