chore: app group optimizations (#1027)

This commit is contained in:
Mo
2022-05-16 21:14:18 -05:00
committed by GitHub
parent 754a189532
commit 62cf34e894
108 changed files with 1796 additions and 1187 deletions

View File

@@ -1,4 +1,4 @@
import { useRef } from 'preact/hooks'
import { useCallback, useRef } from 'preact/hooks'
import { AlertDialog, AlertDialogDescription, AlertDialogLabel } from '@reach/alert-dialog'
import { WebApplication } from '@/UIModels/Application'
import { AppState } from '@/UIModels/AppState'
@@ -18,9 +18,10 @@ export const OtherSessionsSignOutContainer = observer((props: Props) => {
const ConfirmOtherSessionsSignOut = observer(({ application, appState }: Props) => {
const cancelRef = useRef<HTMLButtonElement>(null)
function closeDialog() {
const closeDialog = useCallback(() => {
appState.accountMenu.setOtherSessionsSignOut(false)
}
}, [appState])
return (
<AlertDialog onDismiss={closeDialog} leastDestructiveRef={cancelRef}>