Архив:
{filterCompleteTasks.length} задач(а)
-
-
filterArchiveTasks(event)} />
-
+
-
+
{filterCompleteTasks.map((task, index) => {
- return
-
-
{task.description}
-
{task.dateComplete}
-
-
-
-
{task.name}
-
-
+ return (
+
+
+
{task.description}
+
{task.dateComplete}
+
+
+
+
{task.name}
+
+
+ );
})}
diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js
new file mode 100644
index 00000000..f87eb14c
--- /dev/null
+++ b/src/redux/projectsTrackerSlice.js
@@ -0,0 +1,34 @@
+import { createSlice } from "@reduxjs/toolkit";
+
+const initialState = {
+ project: [
+ {
+ name: "Разработка трекера",
+ count: 4,
+ },
+ {
+ name: "Кинотеатр",
+ count: 4,
+ },
+ {
+ name: "Проект страхование",
+ count: 4,
+ },
+ ],
+};
+
+export const projectsTrackerSlice = createSlice({
+ name: "projectsTracker",
+ initialState,
+ reducers: {
+ setProject(state, action) {
+ state.project.push(action.payload);
+ },
+ },
+});
+
+export const { setProject } = projectsTrackerSlice.actions;
+
+export const addProject = (state) => state.projectsTracker.setProject;
+
+export default projectsTrackerSlice.reducer;
diff --git a/src/store/store.js b/src/store/store.js
index 34e5ed26..f9067e1b 100644
--- a/src/store/store.js
+++ b/src/store/store.js
@@ -1,10 +1,10 @@
-import { configureStore } from '@reduxjs/toolkit';
-import outstaffingReducer from '../redux/outstaffingSlice';
-import loaderReducer from '../redux/loaderSlice';
-import roleReducer from '../redux/roleSlice';
-import reportReducer from '../redux/reportSlice';
-import quizSlice from '../redux/quizSlice';
-
+import { configureStore } from "@reduxjs/toolkit";
+import outstaffingReducer from "../redux/outstaffingSlice";
+import loaderReducer from "../redux/loaderSlice";
+import roleReducer from "../redux/roleSlice";
+import reportReducer from "../redux/reportSlice";
+import quizSlice from "../redux/quizSlice";
+import projectsTrackerSlice from "../redux/projectsTrackerSlice";
export const store = configureStore({
reducer: {
@@ -12,10 +12,11 @@ export const store = configureStore({
loader: loaderReducer,
role: roleReducer,
report: reportReducer,
+ tracker: projectsTrackerSlice,
quiz: quizSlice,
},
- middleware: getDefaultMiddleware =>
- getDefaultMiddleware({
- serializableCheck: false,
- }),
+ middleware: (getDefaultMiddleware) =>
+ getDefaultMiddleware({
+ serializableCheck: false,
+ }),
});