Skip to content

Commit

Permalink
change subtasks to use uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
tuckner committed Dec 25, 2023
1 parent 093a962 commit 770ba6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SideBar from "components/SideBar";
import Board from "components/Board";
import { MdVisibilityOff } from "react-icons/md";
import { useMediaQuery } from "react-responsive";
import { Collapse } from "@chakra-ui/react";
import { Collapse } from "@chakra-ui/react";

function App() {
const [showSidebar,setShowSidebar] = useState<boolean>(false);
Expand Down
4 changes: 3 additions & 1 deletion src/components/Board/AddTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { appData, addTask, editTask, deleteTask } from "redux/boardSlice";
import { useDispatch, useSelector } from "react-redux";
import { checkDuplicatedTask } from "utilis";
import { useToast } from "@chakra-ui/react";
import { v4 as uuidv4 } from "uuid";
import { uuid } from "uuidv4";

Check failure on line 12 in src/components/Board/AddTask.tsx

View workflow job for this annotation

GitHub Actions / deploy

'uuid' is defined but never used

Check failure on line 12 in src/components/Board/AddTask.tsx

View workflow job for this annotation

GitHub Actions / deploy

'uuid' is defined but never used

const generateRandomNumber = (): string => {
return String(Math.floor(Math.random() * (9999 - 9000 + 1)) + 9000);
Expand Down Expand Up @@ -152,7 +154,7 @@ export default function AddTask({ handleClose, tasks }: Props) {
type="button"
onClick={() => {
arrayHelpers.push({
id: generateRandomNumber(),
id: uuidv4(),
title: "",
isCompleted: false,
});
Expand Down

0 comments on commit 770ba6f

Please sign in to comment.