Browse Source

add missing files

sw 1 tháng trước cách đây
mục cha
commit
20e7367fa2
1 tập tin đã thay đổi với 25 bổ sung0 xóa
  1. 25 0
      src/states/security/quotaModalSlice.ts

+ 25 - 0
src/states/security/quotaModalSlice.ts

@@ -0,0 +1,25 @@
+import { createSlice } from '@reduxjs/toolkit';
+
+interface QuotaModalState {
+  isQuotaAlertVisible: boolean;
+}
+
+const initialState: QuotaModalState = {
+  isQuotaAlertVisible: false,
+};
+
+const quotaModalSlice = createSlice({
+  name: 'quotaModal',
+  initialState,
+  reducers: {
+    showQuotaAlert: (state) => {
+      state.isQuotaAlertVisible = true;
+    },
+    hideQuotaAlert: (state) => {
+      state.isQuotaAlertVisible = false;
+    },
+  },
+});
+
+export const { showQuotaAlert, hideQuotaAlert } = quotaModalSlice.actions;
+export default quotaModalSlice.reducer;