Done
This commit is contained in:
parent
b1c627577d
commit
edbd05fa6c
|
|
@ -16,7 +16,7 @@ const ErrorPage: React.FC = () => {
|
||||||
const firstPath = location.pathname.split('/')[1]; // Get the first path segment from the URL
|
const firstPath = location.pathname.split('/')[1]; // Get the first path segment from the URL
|
||||||
console.log(firstPath,"firstPath");
|
console.log(firstPath,"firstPath");
|
||||||
|
|
||||||
queryClient.invalidateQueries(firstPath);
|
queryClient.invalidateQueries(firstPath === "/" ? 'home' : firstPath);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleGoToLogin = () => {
|
const handleGoToLogin = () => {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const API = {
|
||||||
UPDATE: `category`,
|
UPDATE: `category`,
|
||||||
|
|
||||||
};
|
};
|
||||||
const KEY = "category"
|
const KEY = "categories"
|
||||||
|
|
||||||
|
|
||||||
export const useGetCategories = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params);
|
export const useGetCategories = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const API = {
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
const KEY = "product"
|
const KEY = "products"
|
||||||
// const ONEKEY = "Product"
|
// const ONEKEY = "Product"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ import useGetQueryPagination from "./helper/ueGetPagination";
|
||||||
import useAddMutation from "./helper/useAddMutation"
|
import useAddMutation from "./helper/useAddMutation"
|
||||||
import useDeleteMutation from "./helper/useDeleteMutation"
|
import useDeleteMutation from "./helper/useDeleteMutation"
|
||||||
import useGetOneQuery from "./helper/useGetOneQuery";
|
import useGetOneQuery from "./helper/useGetOneQuery";
|
||||||
import useGetQuery from "./helper/useGetQuery"
|
|
||||||
import useUpdateMutation from "./helper/useUpdateMutation";
|
|
||||||
import useUpdateMutationById from "./helper/useUpdateMutationById";
|
import useUpdateMutationById from "./helper/useUpdateMutationById";
|
||||||
|
|
||||||
const API = {
|
const API = {
|
||||||
|
|
@ -14,7 +12,7 @@ const API = {
|
||||||
UPDATE: `SupportMessages`,
|
UPDATE: `SupportMessages`,
|
||||||
|
|
||||||
};
|
};
|
||||||
const KEY = "SupportMessages"
|
const KEY = "support_messages"
|
||||||
|
|
||||||
|
|
||||||
export const useGetSupportMessages = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params);
|
export const useGetSupportMessages = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user