intergrate openening times & show extras
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
REDEEM_DETAILS_URL,
|
||||
LOYALTY_HISTORY_URL,
|
||||
CREATE_GIFT_AMOUNT_URL,
|
||||
OPENING_TIMES_URL,
|
||||
} from "utils/constants";
|
||||
|
||||
import { OrderDetails } from "pages/checkout/hooks/types";
|
||||
@@ -25,6 +26,7 @@ import {
|
||||
import { baseApi } from "./apiSlice";
|
||||
import { EGiftCard } from "pages/EGiftCards/type";
|
||||
import { RedeemResponse } from "pages/redeem/types";
|
||||
import { OpeningTimeResponse } from "./types";
|
||||
|
||||
export const branchApi = baseApi.injectEndpoints({
|
||||
endpoints: (builder) => ({
|
||||
@@ -210,6 +212,15 @@ export const branchApi = baseApi.injectEndpoints({
|
||||
body,
|
||||
}),
|
||||
}),
|
||||
getOpeningTimes: builder.query<OpeningTimeResponse, string | void>({
|
||||
query: (restaurantId: string) => ({
|
||||
url: OPENING_TIMES_URL +"/"+ restaurantId,
|
||||
method: "GET",
|
||||
}),
|
||||
transformResponse: (response: any) => {
|
||||
return response.result;
|
||||
},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
export const {
|
||||
@@ -227,4 +238,5 @@ export const {
|
||||
useGetRedeemDetailsQuery,
|
||||
useGetLoyaltyHistoryQuery,
|
||||
useCreateGiftAmountMutation,
|
||||
useGetOpeningTimesQuery,
|
||||
} = branchApi;
|
||||
|
||||
Reference in New Issue
Block a user