some UX
This commit is contained in:
@@ -24,6 +24,7 @@ export const loginApi = baseApi.injectEndpoints({
|
||||
method: "POST",
|
||||
body,
|
||||
}),
|
||||
invalidatesTags: ["Restaurant"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -26,6 +26,7 @@ export const branchApi = baseApi.injectEndpoints({
|
||||
transformResponse: (response: any) => {
|
||||
return response?.result?.restaurants?.[0];
|
||||
},
|
||||
providesTags: ["Restaurant"],
|
||||
}),
|
||||
getMenu: builder.query<any, string | void>({
|
||||
query: (restaurantId: string) =>
|
||||
@@ -50,7 +51,7 @@ export const branchApi = baseApi.injectEndpoints({
|
||||
method: "POST",
|
||||
body,
|
||||
}),
|
||||
invalidatesTags: ["Orders"],
|
||||
invalidatesTags: ["Orders", "Restaurant"],
|
||||
}),
|
||||
cancelOrder: builder.mutation({
|
||||
query: (body: any) => ({
|
||||
@@ -58,7 +59,7 @@ export const branchApi = baseApi.injectEndpoints({
|
||||
method: "POST",
|
||||
body,
|
||||
}),
|
||||
invalidatesTags: ["Orders"],
|
||||
invalidatesTags: ["Orders", "Restaurant"],
|
||||
}),
|
||||
getTables: builder.query<any, { restaurantID: string; tableType: string }>({
|
||||
query: ({
|
||||
|
||||
Reference in New Issue
Block a user