mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-02 15:03:40 +00:00
feat: add ExamStageActions component for exam fee handling
- Implemented ExamStageActions component to manage actions related to exam booking and payment based on application status. - Added mock-base-query for development, providing a partial mock backend for various API endpoints. - Introduced mock-data for simulating responses in the mock-base-query, covering profiles, vessels, applications, licenses, exams, and notifications.
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import { createApi } from "@reduxjs/toolkit/query/react";
|
||||
import { baseQueryWithReauth } from "./base-query-with-reauth";
|
||||
import { mockBaseQuery } from "./mock-base-query";
|
||||
import { tagTypes } from "./tagTypes";
|
||||
|
||||
// Dev-only preview mode: set VITE_USE_MOCKS=true (repo-root .env.local) to
|
||||
// serve the four preview feature areas from static sample data instead of a
|
||||
// live backend. See mock-base-query.ts for what is and isn't covered.
|
||||
const useMocks =
|
||||
(import.meta as { env?: Record<string, string> }).env?.["VITE_USE_MOCKS"] === "true";
|
||||
|
||||
export const baseApi = createApi({
|
||||
reducerPath: "baseApi",
|
||||
baseQuery: baseQueryWithReauth,
|
||||
baseQuery: useMocks ? mockBaseQuery : baseQueryWithReauth,
|
||||
tagTypes: ["Api", "backOfficeApi", "portalApi", ...tagTypes],
|
||||
endpoints: () => ({}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user