Skip to content

Commit

Permalink
Refactor backlog component to use single state object
Browse files Browse the repository at this point in the history
Reorganized the backlog component to consolidate multiple useState calls into one single state object. This change offers a cleaner approach for managing state in this component, fosters readability, and can potentially improve performance by reducing the number of re-rendering triggers. The interface used for the showModal prop has also been updated to accommodate this change.
  • Loading branch information
claygorman committed Dec 27, 2023
1 parent 6e583b1 commit 7659f82
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 97 deletions.
4 changes: 3 additions & 1 deletion frontend/components/Backlog/Modal/modal.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Dispatch, SetStateAction } from 'react';
export default interface ModalProps {
children: React.ReactNode;
showModal: boolean;
setShowModal: Dispatch<SetStateAction<boolean>>;
setShowModal:
| Dispatch<SetStateAction<boolean>>
| ((showModal: boolean) => void);
containerClasses?: string;
}
Loading

0 comments on commit 7659f82

Please sign in to comment.