(force) Update project: Added 60 new features and made various changes

{warning: this all chnaged}
This commit is contained in:
alij
2024-08-26 23:28:34 +03:30
parent 69d728485e
commit b0c9276e52
54 changed files with 1452 additions and 170 deletions

View File

@@ -0,0 +1,23 @@
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
interface isPaymentGatewayState {
isPaymentGateway: boolean;
}
const initialState: isPaymentGatewayState = {
isPaymentGateway: true,
};
const isPaymentGatewaySlice = createSlice({
name: "isPaymentGateway",
initialState,
reducers: {
setIsPaymentGateway: (state, action: PayloadAction<boolean>) => {
state.isPaymentGateway = action.payload;
},
},
});
export const { setIsPaymentGateway } = isPaymentGatewaySlice.actions;
export default isPaymentGatewaySlice.reducer;

View File

@@ -16,6 +16,7 @@ import {
import tokenReducer from "./slices/token";
import configId from "./slices/configId";
import categoryId from "./slices/categoryId";
import isPaymentGateway from "./slices/isPaymentGateway";
// Encryption settings
const secretKey = "token-encrypt-api";
@@ -47,6 +48,7 @@ const store = configureStore({
token: persistedTokenReducer,
configIdState: configId,
categoryIdState: categoryId,
isPaymentGatewayState: isPaymentGateway,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({