Skip to content

Commit 80af7bb

Browse files
committed
do not use the event with the hook
1 parent 03fdfe7 commit 80af7bb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/compass-components/src/hooks/use-error-details.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,12 @@ export const ErrorDetailsModalArea: React.FC = ({ children }) => {
7777
});
7878

7979
const contextValue = React.useMemo(
80-
() => ({ showErrorDetails, isMounted: true }),
81-
[]
80+
() => ({
81+
showErrorDetails: (options: ErrorDetailsOptions) =>
82+
setErrorDetailsProps({ open: true, ...options }),
83+
isMounted: true,
84+
}),
85+
[setErrorDetailsProps]
8286
);
8387

8488
// Event listener to use confirmation modal outside of react

0 commit comments

Comments
 (0)