diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-03-10 22:50:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-10 22:50:48 +0900 |
commit | 236223d02aa61d8f9011c7484c4e8827d336ecb6 (patch) | |
tree | 2e4ac0c8581a942332447a041b28dd5fa608e283 /src/components/Dialog/context.ts | |
parent | e74c46e9ab480959c4416f83a78289e460bdeec7 (diff) | |
parent | 1aaed1cc0d59ecafa1bb3c7f57f0a323940e6317 (diff) | |
download | voidsky-236223d02aa61d8f9011c7484c4e8827d336ecb6.tar.zst |
Merge branch 'bluesky-social:main' into patch-3
Diffstat (limited to 'src/components/Dialog/context.ts')
-rw-r--r-- | src/components/Dialog/context.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/components/Dialog/context.ts b/src/components/Dialog/context.ts index 9b571e8e9..859f8edd7 100644 --- a/src/components/Dialog/context.ts +++ b/src/components/Dialog/context.ts @@ -21,8 +21,7 @@ export function useDialogControl(): DialogOuterProps['control'] { open: () => {}, close: () => {}, }) - const {activeDialogs, openDialogs} = useDialogStateContext() - const isOpen = openDialogs.includes(id) + const {activeDialogs} = useDialogStateContext() React.useEffect(() => { activeDialogs.current.set(id, control) @@ -36,7 +35,6 @@ export function useDialogControl(): DialogOuterProps['control'] { () => ({ id, ref: control, - isOpen, open: () => { control.current.open() }, @@ -44,6 +42,6 @@ export function useDialogControl(): DialogOuterProps['control'] { control.current.close(cb) }, }), - [id, control, isOpen], + [id, control], ) } |