This commit is contained in:
KarimAldeen 2024-03-30 12:18:49 +03:00
parent b1c627577d
commit edbd05fa6c
4 changed files with 4 additions and 6 deletions

View File

@ -16,7 +16,7 @@ const ErrorPage: React.FC = () => {
const firstPath = location.pathname.split('/')[1]; // Get the first path segment from the URL
console.log(firstPath,"firstPath");
queryClient.invalidateQueries(firstPath);
queryClient.invalidateQueries(firstPath === "/" ? 'home' : firstPath);
};
const handleGoToLogin = () => {

View File

@ -14,7 +14,7 @@ const API = {
UPDATE: `category`,
};
const KEY = "category"
const KEY = "categories"
export const useGetCategories = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params);

View File

@ -18,7 +18,7 @@ const API = {
};
const KEY = "product"
const KEY = "products"
// const ONEKEY = "Product"

View File

@ -3,8 +3,6 @@ import useGetQueryPagination from "./helper/ueGetPagination";
import useAddMutation from "./helper/useAddMutation"
import useDeleteMutation from "./helper/useDeleteMutation"
import useGetOneQuery from "./helper/useGetOneQuery";
import useGetQuery from "./helper/useGetQuery"
import useUpdateMutation from "./helper/useUpdateMutation";
import useUpdateMutationById from "./helper/useUpdateMutationById";
const API = {
@ -14,7 +12,7 @@ const API = {
UPDATE: `SupportMessages`,
};
const KEY = "SupportMessages"
const KEY = "support_messages"
export const useGetSupportMessages = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params);