Changeset View
Changeset View
Standalone View
Standalone View
native/account/registration/registration-context.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import type { RegistrationServerCallInput } from './registration-types.js'; | import type { SetState } from 'lib/types/hook-types.js'; | ||||
import type { | |||||
RegistrationServerCallInput, | |||||
CachedUserSelections, | |||||
} from './registration-types.js'; | |||||
export type RegistrationContextType = { | export type RegistrationContextType = { | ||||
+register: RegistrationServerCallInput => Promise<void>, | +register: RegistrationServerCallInput => Promise<void>, | ||||
+cachedSelections: CachedUserSelections, | |||||
+setCachedSelections: SetState<CachedUserSelections>, | |||||
}; | }; | ||||
const RegistrationContext: React.Context<?RegistrationContextType> = | const RegistrationContext: React.Context<?RegistrationContextType> = | ||||
React.createContext<?RegistrationContextType>(); | React.createContext<?RegistrationContextType>(); | ||||
export { RegistrationContext }; | export { RegistrationContext }; |