Skip to content

Commit

Permalink
refactor: remove unused event variable and make parameter optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-deriv committed Oct 25, 2022
1 parent ae3e041 commit 61f740e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const ModalElement = ({
);
};

const closeModal = (e: IClickEvent) => {
const closeModal = () => {
if (is_open) toggleModal?.();
};

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/hooks/use-onclickoutside.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface IClickEvent extends MouseEvent {

export const useOnClickOutside = (
ref: RefObject<HTMLElement>,
handler: (event: IClickEvent) => void,
handler: (event?: IClickEvent) => void,
validationFn: (event: IClickEvent) => boolean
) => {
React.useEffect(() => {
Expand Down

0 comments on commit 61f740e

Please sign in to comment.