update glass + pattenr + ...
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-07-07 14:48:33 +03:30
parent 2dc44d1c77
commit c08b4ec023
45 changed files with 1576 additions and 317 deletions
+37 -8
View File
@@ -1,16 +1,45 @@
'use client'
"use client";
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import { useState } from 'react'
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { useState } from "react";
import {
getRestaurantSlugFromPath,
restorePersistedRestaurantQueries,
} from "@/lib/helpers/themeCache";
export function ReactQueryProvider({ children }: { children: React.ReactNode }) {
const [queryClient] = useState(() => new QueryClient())
function createQueryClient() {
const client = new QueryClient({
defaultOptions: {
queries: {
retry: false,
retryOnMount: false,
},
mutations: {
retry: false,
},
},
});
if (typeof window !== "undefined") {
const slug = getRestaurantSlugFromPath();
if (slug) {
restorePersistedRestaurantQueries(client, slug);
}
}
return client;
}
export function ReactQueryProvider({
children,
}: {
children: React.ReactNode;
}) {
const [queryClient] = useState(createQueryClient);
return (
<QueryClientProvider client={queryClient}>
{children}
{/* <ReactQueryDevtools initialIsOpen={false} /> */}
</QueryClientProvider>
)
);
}