Fixed auth page and tracker

This commit is contained in:
MaxOvs19 committed 2023-03-27 19:08:01 +03:00
1 parent fc51fbdb09
commit 76334aec99
9 files changed
+86 -20

No files matched your search

+12 -8
View File
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { useDispatch } from "react-redux";
import { setProject } from "../../../redux/projectsTrackerSlice";
import { setProject } from "../../../redux/projectsTrackerSlice";
import "./ModalCreate.scss";
@@ -9,13 +9,17 @@ export const ModalCreate = ({ active, setActive, title }) => {
const dispatch = useDispatch();
function createName() {
let newItem = {
name: inputValue,
count: 0,
};
dispatch(setProject(newItem));
setActive(false);
setInputValue("")
if (inputValue === "") {
return;
} else {
let newItem = {
name: inputValue,
count: 0,
};
dispatch(setProject(newItem));
setActive(false);
setInputValue("");
}
}
return (