diff options
author | JayZed <[email protected]> | 2024-09-29 21:05:46 -0400 |
---|---|---|
committer | JayZed <[email protected]> | 2024-09-29 21:05:46 -0400 |
commit | c2a1e4d62c1bbb372127a78e4419a96d3c00e81c (patch) | |
tree | af19b97bbb71b514ef39928e55769fa85064e23a /frontend/src/modules/modals/hooks.ts | |
parent | 4cc6806193127f9d6d3f2dab26969471d9bbf159 (diff) | |
parent | 0200bb96d98127ee32b6b66f8d6b9e21d4571a4d (diff) | |
download | bazarr-c2a1e4d62c1bbb372127a78e4419a96d3c00e81c.tar.gz bazarr-c2a1e4d62c1bbb372127a78e4419a96d3c00e81c.zip |
Merge branch 'development' of https://github.com/morpheus65535/bazarr into developmentv1.4.5-beta.7
Diffstat (limited to 'frontend/src/modules/modals/hooks.ts')
-rw-r--r-- | frontend/src/modules/modals/hooks.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/frontend/src/modules/modals/hooks.ts b/frontend/src/modules/modals/hooks.ts index 09855ac51..667e429d3 100644 --- a/frontend/src/modules/modals/hooks.ts +++ b/frontend/src/modules/modals/hooks.ts @@ -5,11 +5,8 @@ import { ModalSettings } from "@mantine/modals/lib/context"; import { ModalComponent, ModalIdContext } from "./WithModal"; export function useModals() { - const { - openContextModal: openMantineContextModal, - closeContextModal: closeContextModalRaw, - ...rest - } = useMantineModals(); + const { openContextModal: openMantineContextModal, ...rest } = + useMantineModals(); const openContextModal = useCallback( <ARGS extends {}>( @@ -26,7 +23,7 @@ export function useModals() { [openMantineContextModal], ); - const closeContextModal = useCallback( + const closeContext = useCallback( (modal: ModalComponent) => { rest.closeModal(modal.modalKey); }, @@ -43,7 +40,7 @@ export function useModals() { // TODO: Performance return useMemo( - () => ({ openContextModal, closeContextModal, closeSelf, ...rest }), - [closeContextModal, closeSelf, openContextModal, rest], + () => ({ openContextModal, closeContext, closeSelf, ...rest }), + [closeContext, closeSelf, openContextModal, rest], ); } |