updaaaate
This commit is contained in:
2
.env
Normal file
2
.env
Normal file
@@ -0,0 +1,2 @@
|
||||
VITE_BASE_URL="https://rexplorerapi.azurewebsites.net/"
|
||||
VITE_IMAGE_URL="https://regroup.betadelivery.com/"
|
||||
@@ -1,72 +1,24 @@
|
||||
// io.service.js
|
||||
// api.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
export const ioService = createApi({
|
||||
reducerPath: "ioService",
|
||||
baseQuery: baseQuery,
|
||||
|
||||
|
||||
export const rubix = createApi({
|
||||
reducerPath: "rubix",
|
||||
baseQuery: fetchBaseQuery({
|
||||
baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
}),
|
||||
tagTypes: [
|
||||
"prePopulate",
|
||||
"getIO",
|
||||
"getKeyMerits",
|
||||
"getArtifactsVideo",
|
||||
"getInvestmentDocuments",
|
||||
"getIOById",
|
||||
"getSponser",
|
||||
"getInvestmentType",
|
||||
"getInvestmentTypeID"
|
||||
"getTransCount",
|
||||
],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
// =====[get prepopulate data]
|
||||
|
||||
getIOprepopulateData: builder.query({
|
||||
query: () => `/io/admin/pre-populate`,
|
||||
providesTags: ["prePopulate"],
|
||||
}),
|
||||
|
||||
|
||||
getIOById: builder.query({
|
||||
query: (id) => ({ url: `/io/admin/${id}` }),
|
||||
providesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// =====[create]
|
||||
createIO: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/io/admin`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIO"],
|
||||
}),
|
||||
|
||||
updateIO: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById", "getIO", "prePopulate"],
|
||||
}),
|
||||
|
||||
|
||||
deleteKeyMerits: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/io/admin/key-merits/hard-delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
getTransCount: builder.query({
|
||||
query: () => `api/Analytics/Transactions/GetCount`,
|
||||
providesTags: ["getTransCount"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetIOprepopulateDataQuery,
|
||||
useGetIOByIdQuery,
|
||||
useCreateIOMutation,
|
||||
useUpdateIOMutation,
|
||||
useDeleteKeyMeritsMutation,
|
||||
} = ioService;
|
||||
useGetTransCountQuery
|
||||
} = rubix;
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
// io.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
export const onBoard = createApi({
|
||||
reducerPath: "onBoard",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: [
|
||||
"interest",
|
||||
"fetchComunities"
|
||||
],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
// =====[send otp]
|
||||
sendOtp: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/send_otp`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[verifiy otp]
|
||||
verifyOtp: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/verify_otp`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[add profile]
|
||||
addProfile: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/add_profile`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[get interest]
|
||||
getInterest: builder.query({
|
||||
query: () => `/fetch-interests`,
|
||||
providesTags: ["interest"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
// =====[selected Interest]
|
||||
selectedInterest: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/select-interests`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[forgot password]
|
||||
forgotPassword: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/forgot-password`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
|
||||
// =====[forgot password]
|
||||
forgotPasswordVerifyOtp: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/forgot-password/verify-otp`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[Reset password]
|
||||
resetPassword: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/reset-password`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
|
||||
// =====[fetch Comunities]
|
||||
fetchComunities: builder.query({
|
||||
query: () => `/fetch-communities`,
|
||||
providesTags: ["fetchComunities"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
// =====[select Communnity]
|
||||
selectCommunnity: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/select-communities`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
// =====[ /tell-us-about-your-business ]
|
||||
tellUsAboutYourBussiness: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/tell-us-about-your-business`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[fetch Groups]
|
||||
fetchGroups: builder.query({
|
||||
query: () => `/fetch-groups`,
|
||||
providesTags: ["fetchGroups"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
// =====[select Groups]
|
||||
selectGroups: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/select-groups`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[ bussines-profile stepper form ]
|
||||
updateBussinessStepperForm: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/update-business-profile-step-1`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
searchGroups: builder.query({
|
||||
query: (searchData) => `search-group?search_data=${searchData}`,
|
||||
}),
|
||||
|
||||
|
||||
searchCommunity: builder.query({
|
||||
query: (searchData) => `search-community?search_data=${searchData}`,
|
||||
}),
|
||||
|
||||
|
||||
|
||||
// =====[Google Login]
|
||||
googleLogin: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/sign-in-with-google-login`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[Update user Account type]
|
||||
updateUserAccountType: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/update-user-account-type`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
|
||||
|
||||
|
||||
|
||||
useSendOtpMutation,
|
||||
useVerifyOtpMutation,
|
||||
useAddProfileMutation,
|
||||
useGetInterestQuery,
|
||||
useSelectedInterestMutation,
|
||||
useForgotPasswordMutation,
|
||||
useForgotPasswordVerifyOtpMutation,
|
||||
useResetPasswordMutation,
|
||||
useFetchComunitiesQuery,
|
||||
useSelectCommunnityMutation,
|
||||
useTellUsAboutYourBussinessMutation,
|
||||
useFetchGroupsQuery,
|
||||
useSelectGroupsMutation,
|
||||
useUpdateBussinessStepperFormMutation,
|
||||
useSearchGroupsQuery,
|
||||
useSearchCommunityQuery,
|
||||
useGoogleLoginMutation,
|
||||
useUpdateUserAccountTypeMutation
|
||||
|
||||
|
||||
|
||||
|
||||
} = onBoard;
|
||||
@@ -1,50 +0,0 @@
|
||||
// io.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
export const profile = createApi({
|
||||
reducerPath: "profile",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: [
|
||||
"getProfile"
|
||||
],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
// =====[send otp]
|
||||
sendOtp: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/send_otp`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
// =====[get interest]
|
||||
getProfile: builder.query({
|
||||
query: () => `/fetch-profile`,
|
||||
providesTags: ["getProfile"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
|
||||
useSendOtpMutation,
|
||||
useGetProfileQuery,
|
||||
|
||||
} = profile;
|
||||
@@ -1,140 +1,140 @@
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
import Cookies from "js-cookie";
|
||||
// import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import Cookies from "js-cookie";
|
||||
|
||||
// Define a base query function with token refresh logic
|
||||
// // Define a base query function with token refresh logic
|
||||
|
||||
console.log(import.meta.env.VITE_BASE_URL);
|
||||
export const baseQuery = async (args, api, extraOptions) => {
|
||||
let result = await fetchBaseQuery({
|
||||
baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
prepareHeaders: (headers) => {
|
||||
const token = localStorage.getItem("accessToken");
|
||||
const username = import.meta.env.VITE_USERNAME || 'defaultUsername';
|
||||
const password = import.meta.env.VITE_PASSWORD || 'defaultPassword';
|
||||
// console.log(import.meta.env.VITE_BASE_URL);
|
||||
// export const baseQuery = async (args, api, extraOptions) => {
|
||||
// let result = await fetchBaseQuery({
|
||||
// baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
// prepareHeaders: (headers) => {
|
||||
// // const token = localStorage.getItem("accessToken");
|
||||
// // const username = import.meta.env.VITE_USERNAME || 'defaultUsername';
|
||||
// // const password = import.meta.env.VITE_PASSWORD || 'defaultPassword';
|
||||
|
||||
// Encode credentials to Base64
|
||||
const basicAuth = btoa(`${username}:${password}`);
|
||||
// // // Encode credentials to Base64
|
||||
// // const basicAuth = btoa(`${username}:${password}`);
|
||||
|
||||
// Set the Authorization header
|
||||
headers.set('Authorization', `Basic ${basicAuth}`);
|
||||
// // // Set the Authorization header
|
||||
// // headers.set('Authorization', `Basic ${basicAuth}`);
|
||||
|
||||
// Set the token if available
|
||||
if (token) {
|
||||
headers.set("access-token", token);
|
||||
}
|
||||
return headers;
|
||||
},
|
||||
})(args, api, extraOptions);
|
||||
// // // Set the token if available
|
||||
// // if (token) {
|
||||
// // headers.set("access-token", token);
|
||||
// // }
|
||||
// return headers;
|
||||
// },
|
||||
// })(args, api, extraOptions);
|
||||
|
||||
if (result.error && result.error.status === 401) {
|
||||
// Handle token refresh
|
||||
// const refreshToken = localStorage.getItem("refreshToken");
|
||||
// if (refreshToken) {
|
||||
// try {
|
||||
// const refreshResult = await fetchBaseQuery({
|
||||
// baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
// })(
|
||||
// {
|
||||
// url: "/auth/user/regenerate-token",
|
||||
// method: "POST",
|
||||
// body: { refreshToken },
|
||||
// },
|
||||
// api,
|
||||
// extraOptions
|
||||
// );
|
||||
// // if (result.error && result.error.status === 401) {
|
||||
// // // Handle token refresh
|
||||
// // // const refreshToken = localStorage.getItem("refreshToken");
|
||||
// // // if (refreshToken) {
|
||||
// // // try {
|
||||
// // // const refreshResult = await fetchBaseQuery({
|
||||
// // // baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
// // // })(
|
||||
// // // {
|
||||
// // // url: "/auth/user/regenerate-token",
|
||||
// // // method: "POST",
|
||||
// // // body: { refreshToken },
|
||||
// // // },
|
||||
// // // api,
|
||||
// // // extraOptions
|
||||
// // // );
|
||||
|
||||
// if (refreshResult.data) {
|
||||
// // Save new tokens
|
||||
// localStorage.setItem("accessToken", refreshResult.data.access.token);
|
||||
// localStorage.setItem("refreshToken", refreshResult.data.refresh.token);
|
||||
// localStorage.setItem("refreshTokenExp", refreshResult.data.refresh.expires);
|
||||
// // // if (refreshResult.data) {
|
||||
// // // // Save new tokens
|
||||
// // // localStorage.setItem("accessToken", refreshResult.data.access.token);
|
||||
// // // localStorage.setItem("refreshToken", refreshResult.data.refresh.token);
|
||||
// // // localStorage.setItem("refreshTokenExp", refreshResult.data.refresh.expires);
|
||||
|
||||
// // Retry the original request with the new token
|
||||
// result = await fetchBaseQuery({
|
||||
// baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
// prepareHeaders: (headers) => {
|
||||
// const newToken = localStorage.getItem("accessToken");
|
||||
// // // // Retry the original request with the new token
|
||||
// // // result = await fetchBaseQuery({
|
||||
// // // baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
// // // prepareHeaders: (headers) => {
|
||||
// // // const newToken = localStorage.getItem("accessToken");
|
||||
|
||||
// // Set the Authorization header again
|
||||
// headers.set('Authorization', `Basic ${basicAuth}`);
|
||||
// // // // Set the Authorization header again
|
||||
// // // headers.set('Authorization', `Basic ${basicAuth}`);
|
||||
|
||||
// // Set the new token
|
||||
// if (newToken) {
|
||||
// headers.set("x-auth-token", newToken);
|
||||
// }
|
||||
// return headers;
|
||||
// },
|
||||
// })(args, api, extraOptions);
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.error("Failed to refresh token:", err);
|
||||
// // Handle refresh failure (e.g., redirect to login)
|
||||
// }
|
||||
// }
|
||||
const [ logout ] = useLogoutMutation()
|
||||
const res = await logout()
|
||||
console.log(res);
|
||||
// Remove token and authenticated status from storage and cookies
|
||||
localStorage.removeItem("accessToken");
|
||||
localStorage.removeItem("refreshToken");
|
||||
Cookies.remove("isAuthenticated", { path: '/login' });
|
||||
// // // // Set the new token
|
||||
// // // if (newToken) {
|
||||
// // // headers.set("x-auth-token", newToken);
|
||||
// // // }
|
||||
// // // return headers;
|
||||
// // // },
|
||||
// // // })(args, api, extraOptions);
|
||||
// // // }
|
||||
// // // } catch (err) {
|
||||
// // // console.error("Failed to refresh token:", err);
|
||||
// // // // Handle refresh failure (e.g., redirect to login)
|
||||
// // // }
|
||||
// // // }
|
||||
// // const [ logout ] = useLogoutMutation()
|
||||
// // const res = await logout()
|
||||
// // console.log(res);
|
||||
// // // Remove token and authenticated status from storage and cookies
|
||||
// // localStorage.removeItem("accessToken");
|
||||
// // localStorage.removeItem("refreshToken");
|
||||
// // Cookies.remove("isAuthenticated", { path: '/login' });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
// // }
|
||||
|
||||
return result;
|
||||
};
|
||||
// return result;
|
||||
// };
|
||||
|
||||
// Create an RTK Query API slice
|
||||
export const apiSlice = createApi({
|
||||
reducerPath: "api",
|
||||
baseQuery: baseQuery,
|
||||
endpoints: (builder) => ({
|
||||
// // Create an RTK Query API slice
|
||||
// export const apiSlice = createApi({
|
||||
// reducerPath: "api",
|
||||
// baseQuery: baseQuery,
|
||||
// endpoints: (builder) => ({
|
||||
|
||||
login: builder.mutation({
|
||||
query: (credentials) => ({
|
||||
url: "/login",
|
||||
method: "POST",
|
||||
body: credentials,
|
||||
}),
|
||||
async onQueryStarted(arg, { dispatch, queryFulfilled }) {
|
||||
try {
|
||||
const { data } = await queryFulfilled;
|
||||
console.log(data?.data['access-token']);
|
||||
// Store tokens in local storage
|
||||
localStorage.setItem("accessToken", data?.data['access-token']);
|
||||
localStorage.setItem("refreshToken", data?.data?.refresh?.token);
|
||||
localStorage.setItem("accessTokenExp", data?.data?.access?.expires);
|
||||
} catch (error) {
|
||||
console.error("Login failed:", error);
|
||||
}
|
||||
},
|
||||
}),
|
||||
// // login: builder.mutation({
|
||||
// // query: (credentials) => ({
|
||||
// // url: "/login",
|
||||
// // method: "POST",
|
||||
// // body: credentials,
|
||||
// // }),
|
||||
// // async onQueryStarted(arg, { dispatch, queryFulfilled }) {
|
||||
// // try {
|
||||
// // const { data } = await queryFulfilled;
|
||||
// // console.log(data?.data['access-token']);
|
||||
// // // Store tokens in local storage
|
||||
// // localStorage.setItem("accessToken", data?.data['access-token']);
|
||||
// // localStorage.setItem("refreshToken", data?.data?.refresh?.token);
|
||||
// // localStorage.setItem("accessTokenExp", data?.data?.access?.expires);
|
||||
// // } catch (error) {
|
||||
// // console.error("Login failed:", error);
|
||||
// // }
|
||||
// // },
|
||||
// // }),
|
||||
|
||||
|
||||
logout: builder.mutation({
|
||||
query: (credentials) => ({
|
||||
url: "/logout",
|
||||
method: "POST",
|
||||
}),
|
||||
}),
|
||||
// // logout: builder.mutation({
|
||||
// // query: (credentials) => ({
|
||||
// // url: "/logout",
|
||||
// // method: "POST",
|
||||
// // }),
|
||||
// // }),
|
||||
|
||||
|
||||
refreshToken: builder.mutation({
|
||||
query: (refreshToken) => ({
|
||||
url: "/auth/user/regenerate-token",
|
||||
method: "POST",
|
||||
body: { refreshToken },
|
||||
}),
|
||||
}),
|
||||
// Add more endpoints as needed
|
||||
}),
|
||||
});
|
||||
// // refreshToken: builder.mutation({
|
||||
// // query: (refreshToken) => ({
|
||||
// // url: "/auth/user/regenerate-token",
|
||||
// // method: "POST",
|
||||
// // body: { refreshToken },
|
||||
// // }),
|
||||
// // }),
|
||||
// // Add more endpoints as needed
|
||||
// }),
|
||||
// });
|
||||
|
||||
export const { useLoginMutation, useRefreshTokenMutation, useLogoutMutation } = apiSlice;
|
||||
// // export const { useLoginMutation, useRefreshTokenMutation, useLogoutMutation } = apiSlice;
|
||||
|
||||
export default apiSlice;
|
||||
// export default apiSlice;
|
||||
|
||||
@@ -1,66 +1,80 @@
|
||||
// import { configureStore } from "@reduxjs/toolkit";
|
||||
// import { setupListeners } from "@reduxjs/toolkit/query";
|
||||
// // import { sponserMaster } from "../Services/sponser.service";
|
||||
// // import { investmentType } from "../Services/investment.type.service";
|
||||
// // import { exchangeRate } from "../Services/exchange.rate.service";
|
||||
// // import { ioService } from "../Services/io.service";
|
||||
// // import { investorDetails } from "../Services/investor.details.service";
|
||||
// // import { investorTransaction } from "../Services/investor.transaction.service";
|
||||
// // import { api } from "../Services/api.service";
|
||||
// // import { keyMerits } from "../Services/Key.merits.service";
|
||||
// // import { bankDetails } from "../Services/bank.details.service";
|
||||
// // import { contact } from "../Services/contact.service";
|
||||
// // import { depositRequest } from "../Services/deposit.request.service";
|
||||
// import { apiSlice, baseQuery } from "../Services/token.serivce";
|
||||
// import { onBoard } from "../Services/onboard.service";
|
||||
// import { profile } from "../Services/profile.service";
|
||||
// // import { drawalRequest } from "../Services/drawal.request.service";
|
||||
// // import { deleteRequest } from "../Services/delete.request.service";
|
||||
|
||||
// export const store = configureStore({
|
||||
// reducer: {
|
||||
// [apiSlice.reducerPath]: apiSlice.reducer,
|
||||
// [onBoard.reducerPath]: onBoard.reducer,
|
||||
// [profile.reducerPath]: profile.reducer,
|
||||
// // [sponserMaster.reducerPath]: sponserMaster.reducer,
|
||||
// // [investmentType.reducerPath]: investmentType.reducer,
|
||||
// // [exchangeRate.reducerPath]: exchangeRate.reducer,
|
||||
// // [ioService.reducerPath]: ioService.reducer,
|
||||
// // [investorDetails.reducerPath]: investorDetails.reducer,
|
||||
// // [investorTransaction.reducerPath]: investorTransaction.reducer,
|
||||
// // [bankDetails.reducerPath]: bankDetails.reducer,
|
||||
// // [contact.reducerPath]: contact.reducer,
|
||||
// // [depositRequest.reducerPath]: depositRequest.reducer,
|
||||
// // [drawalRequest.reducerPath]: drawalRequest.reducer,
|
||||
// // [deleteRequest.reducerPath]: deleteRequest.reducer,
|
||||
// // Add other reducers as needed
|
||||
// },
|
||||
// middleware: (getDefaultMiddleware) =>
|
||||
// getDefaultMiddleware({
|
||||
// thunk: {
|
||||
// extraArgument: baseQuery, // Pass Axios instance as extra argument
|
||||
// },
|
||||
// }).concat(
|
||||
// onBoard.middleware,
|
||||
// apiSlice.middleware,
|
||||
// profile.middleware,
|
||||
// // investmentType.middleware,
|
||||
// // exchangeRate.middleware,
|
||||
// // ioService.middleware,
|
||||
// // investorDetails.middleware,
|
||||
// // investorTransaction.middleware,
|
||||
// // bankDetails.middleware,
|
||||
// // contact.middleware,
|
||||
// // depositRequest.middleware,
|
||||
// // drawalRequest.middleware,
|
||||
// // deleteRequest.middleware,
|
||||
// ),
|
||||
// });
|
||||
|
||||
// setupListeners(store.dispatch);
|
||||
|
||||
// export default store;
|
||||
|
||||
|
||||
|
||||
import { configureStore } from "@reduxjs/toolkit";
|
||||
import { setupListeners } from "@reduxjs/toolkit/query";
|
||||
// import { sponserMaster } from "../Services/sponser.service";
|
||||
// import { investmentType } from "../Services/investment.type.service";
|
||||
// import { exchangeRate } from "../Services/exchange.rate.service";
|
||||
// import { ioService } from "../Services/io.service";
|
||||
// import { investorDetails } from "../Services/investor.details.service";
|
||||
// import { investorTransaction } from "../Services/investor.transaction.service";
|
||||
// import { api } from "../Services/api.service";
|
||||
// import { keyMerits } from "../Services/Key.merits.service";
|
||||
// import { bankDetails } from "../Services/bank.details.service";
|
||||
// import { contact } from "../Services/contact.service";
|
||||
// import { depositRequest } from "../Services/deposit.request.service";
|
||||
import { apiSlice, baseQuery } from "../Services/token.serivce";
|
||||
import { onBoard } from "../Services/onboard.service";
|
||||
import { profile } from "../Services/profile.service";
|
||||
// import { drawalRequest } from "../Services/drawal.request.service";
|
||||
// import { deleteRequest } from "../Services/delete.request.service";
|
||||
import { rubix } from "../Services/api.service";
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
[apiSlice.reducerPath]: apiSlice.reducer,
|
||||
[onBoard.reducerPath]: onBoard.reducer,
|
||||
[profile.reducerPath]: profile.reducer,
|
||||
// [sponserMaster.reducerPath]: sponserMaster.reducer,
|
||||
// [investmentType.reducerPath]: investmentType.reducer,
|
||||
// [exchangeRate.reducerPath]: exchangeRate.reducer,
|
||||
// [ioService.reducerPath]: ioService.reducer,
|
||||
// [investorDetails.reducerPath]: investorDetails.reducer,
|
||||
// [investorTransaction.reducerPath]: investorTransaction.reducer,
|
||||
// [bankDetails.reducerPath]: bankDetails.reducer,
|
||||
// [contact.reducerPath]: contact.reducer,
|
||||
// [depositRequest.reducerPath]: depositRequest.reducer,
|
||||
// [drawalRequest.reducerPath]: drawalRequest.reducer,
|
||||
// [deleteRequest.reducerPath]: deleteRequest.reducer,
|
||||
// Add other reducers as needed
|
||||
// Add the rubix API reducer
|
||||
[rubix.reducerPath]: rubix.reducer,
|
||||
},
|
||||
// Adding the api middleware enables caching, invalidation, polling, and other features of RTK Query
|
||||
middleware: (getDefaultMiddleware) =>
|
||||
getDefaultMiddleware({
|
||||
thunk: {
|
||||
extraArgument: baseQuery, // Pass Axios instance as extra argument
|
||||
},
|
||||
}).concat(
|
||||
onBoard.middleware,
|
||||
apiSlice.middleware,
|
||||
profile.middleware,
|
||||
// investmentType.middleware,
|
||||
// exchangeRate.middleware,
|
||||
// ioService.middleware,
|
||||
// investorDetails.middleware,
|
||||
// investorTransaction.middleware,
|
||||
// bankDetails.middleware,
|
||||
// contact.middleware,
|
||||
// depositRequest.middleware,
|
||||
// drawalRequest.middleware,
|
||||
// deleteRequest.middleware,
|
||||
),
|
||||
getDefaultMiddleware().concat(rubix.middleware),
|
||||
});
|
||||
|
||||
setupListeners(store.dispatch);
|
||||
|
||||
export default store;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Black.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Black.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackNarrow.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackNarrowItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackNarrowItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackWide.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackWideItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BlackWideItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Bold.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Bold.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldNarrow.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldNarrowItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldNarrowItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldWide.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldWideItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-BoldWideItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBold.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBoldItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBoldItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBoldNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBoldNarrow.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBoldWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-ExtraBoldWide.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Light.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Light.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightNarrow.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightNarrowItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightNarrowItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightWide.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightWideItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-LightWideItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Medium.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Medium.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumNarrow.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumNarrowItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumNarrowItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumWide.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumWideItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-MediumWideItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Regular.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-Regular.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularNarrow.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularWide.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularWideItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-RegularWideItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBold.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBold.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldNarrow.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldWide.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldWideItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-SemiBoldWideItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLight.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLight.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLightItalic.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLightItalic.ttf
Normal file
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLightNarrow.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLightNarrow.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLightWide.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans-UltraLightWide.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans.ttf
Normal file
BIN
src/assets/mona-sans-cufonfonts/Mona-Sans.ttf
Normal file
Binary file not shown.
@@ -50,7 +50,7 @@ const Pagination = ({
|
||||
<HStack mt={16}>
|
||||
{/* <Text className='web-text-small'>Tanami v0.1</Text> */}
|
||||
|
||||
<HStack justifyContent={"space-between"} w={"100%"}>
|
||||
{/* <HStack justifyContent={"space-between"} w={"100%"}>
|
||||
<Button
|
||||
mt={1}
|
||||
size={"sm"}
|
||||
@@ -70,7 +70,7 @@ const Pagination = ({
|
||||
}}
|
||||
>
|
||||
Previous
|
||||
</Button>
|
||||
</Button> */}
|
||||
{/* <Text
|
||||
w={"100px"}
|
||||
display={"flex"}
|
||||
@@ -83,7 +83,7 @@ const Pagination = ({
|
||||
{isLoading ? "00" : totalItems}
|
||||
</Text> */
|
||||
}
|
||||
<Text><Text as={"span"} me={3}>1</Text> <Text as={"span"} me={3}>2</Text> <Text as={"span"} me={3}>3</Text> <Text as={"span"} me={3}>4</Text><Text as={"span"} >....</Text></Text>
|
||||
{/* <Text><Text as={"span"} me={3}>1</Text> <Text as={"span"} me={3}>2</Text> <Text as={"span"} me={3}>3</Text> <Text as={"span"} me={3}>4</Text><Text as={"span"} >....</Text></Text>
|
||||
<Button
|
||||
mt={1}
|
||||
size={"sm"}
|
||||
@@ -103,8 +103,8 @@ const Pagination = ({
|
||||
}}
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</HStack>
|
||||
</Button> */}
|
||||
{/* </HStack> */}
|
||||
</HStack>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
|
||||
:root {
|
||||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
/* font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; */
|
||||
line-height: 1.5;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -33,6 +35,7 @@ body {
|
||||
place-items: center;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
font-family: "Montserrat", sans-serif !important;
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
||||
@@ -22,6 +22,7 @@ import Pagination from "../components/Pagination";
|
||||
import bannerImage from "../assets/images/bannerImg.png";
|
||||
import bannerImageMobile from "../assets/images/bannerImgmobile.png";
|
||||
import { BiSearchAlt } from "react-icons/bi";
|
||||
import { useGetTransCountQuery } from "../Services/api.service";
|
||||
|
||||
const Home = () => {
|
||||
const [isSwitchOn, setIsSwitchOn] = useState(true);
|
||||
@@ -29,6 +30,14 @@ const Home = () => {
|
||||
const [ searchTerm, setSearchTerm] = useState("")
|
||||
const navigate = useNavigate()
|
||||
|
||||
const {
|
||||
data,
|
||||
isLoading,
|
||||
refetch,
|
||||
errors
|
||||
} = useGetTransCountQuery()
|
||||
console.log(data?.data);
|
||||
|
||||
return (
|
||||
<Box
|
||||
bg={colorMode === "light" ? "#fff" : "none"}
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: 3000, // You can use any port
|
||||
proxy: {
|
||||
// This proxies API calls to your backend during development to bypass CORS
|
||||
'/api': {
|
||||
target: 'https://rexplorerapi.azurewebsites.net/', // Replace this with your API base URL
|
||||
changeOrigin: true, // Needed for virtual hosted sites
|
||||
secure: false, // If your API is HTTPS and you're not using a certificate, this can be false
|
||||
rewrite: (path) => path.replace(/^\/api/, ''), // Removes '/api' prefix when forwarding to the server
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
@@ -40,4 +48,4 @@ export default defineConfig({
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user