瀏覽代碼

add missing files

sw 1 月之前
父節點
當前提交
20e7367fa2
共有 1 個文件被更改,包括 25 次插入0 次删除
  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;