Skip to content

Commit

Permalink
trim generated id size
Browse files Browse the repository at this point in the history
  • Loading branch information
tuckner committed Dec 19, 2023
1 parent b37ab6f commit 420695a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Board/AddTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function AddTask({ handleClose, tasks }: Props) {
subtasks: tasks.subtasks,
}
: {
id: uuidv4(),
id: uuidv4().slice(5),
name: "",
description: "",
category: selectedColumn,
Expand Down Expand Up @@ -149,7 +149,7 @@ export default function AddTask({ handleClose, tasks }: Props) {
type="button"
onClick={() => {
arrayHelpers.push({
id: uuidv4(),
id: uuidv4().slice(5),
title: "",
isCompleted: false,
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/Board/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Index() {
dispatch(deleteTask(sourceTask));
const updatedTasks = {
...sourceTask,
id: uuidv4(),
id: uuidv4().slice(5),
status: result.destination.droppableId,
};
const position = result.destination.index;
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Index({ selectedColumn, setSelectedColumn, tasks }: Prop
if (tasks && 'status' in tasks && tasks.status !== title) {
const updatedTasks = {
...tasks,
id: uuidv4(),
id: uuidv4().slice(5),
status: title,
};
dispatch(addTask({ updatedTasks, position: 0 }));
Expand Down

0 comments on commit 420695a

Please sign in to comment.