Add new state
This commit is contained in:
@@ -13,13 +13,11 @@ import {useRefreshSession} from '#/components/dialogs/EmailDialog/data/useRefres
|
||||
*/
|
||||
import {Update} from '#/components/dialogs/EmailDialog/screens/Update'
|
||||
import {Verify} from '#/components/dialogs/EmailDialog/screens/Verify'
|
||||
import {type Screen,ScreenID} from '#/components/dialogs/EmailDialog/types'
|
||||
import {type Screen, ScreenID} from '#/components/dialogs/EmailDialog/types'
|
||||
|
||||
export {useDialogControl} from '#/components/Dialog'
|
||||
export {
|
||||
ScreenID as EmailDialogScreenID,
|
||||
type Screen,
|
||||
} from '#/components/dialogs/EmailDialog/types'
|
||||
export type {Screen} from '#/components/dialogs/EmailDialog/types'
|
||||
export {ScreenID as EmailDialogScreenID} from '#/components/dialogs/EmailDialog/types'
|
||||
|
||||
export function useEmailDialogControl() {
|
||||
return useStatefulDialogControl<Screen>()
|
||||
|
||||
@@ -17,8 +17,16 @@ export type Screen =
|
||||
instructions?: ReactNode[]
|
||||
hideInitialCodeButton?: boolean
|
||||
}
|
||||
| {
|
||||
id: ScreenID.Enable2FA
|
||||
}
|
||||
| {
|
||||
id: ScreenID.Disable2FA
|
||||
}
|
||||
|
||||
export enum ScreenID {
|
||||
Update = 'Update', // normal, instructs to click link first
|
||||
Verify = 'Verify', // as a separate step, instructs to click link first
|
||||
Update = 'Update',
|
||||
Verify = 'Verify',
|
||||
Enable2FA = 'Enable2FA',
|
||||
Disable2FA = 'Disable2FA',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user