feat(SW-160): update profile
This commit is contained in:
committed by
Michael Zetterberg
parent
b6e22d51a5
commit
2337d37f1a
@@ -4,25 +4,31 @@ export type EditFormProps = {
|
||||
user: User
|
||||
}
|
||||
|
||||
type E = {
|
||||
message: string
|
||||
path: string
|
||||
}
|
||||
|
||||
export const enum Status {
|
||||
error = "error",
|
||||
success = "success",
|
||||
}
|
||||
|
||||
type ErrorState = {
|
||||
errors?: E[]
|
||||
type Data = Record<
|
||||
string,
|
||||
string | undefined | Record<string, string | undefined>
|
||||
>
|
||||
|
||||
type Issue = {
|
||||
field: string
|
||||
message: string
|
||||
status: Status.error
|
||||
}
|
||||
|
||||
type SuccessState = {
|
||||
export type State = {
|
||||
data: Data
|
||||
message: string
|
||||
status: Status.success
|
||||
}
|
||||
|
||||
export type State = ErrorState | SuccessState | null
|
||||
} & (
|
||||
| {
|
||||
issues: never
|
||||
status: Status.success
|
||||
}
|
||||
| {
|
||||
issues: Issue[]
|
||||
status: Status.error
|
||||
}
|
||||
)
|
||||
|
||||
4
types/jwt.d.ts
vendored
4
types/jwt.d.ts
vendored
@@ -11,9 +11,9 @@ declare module "next-auth/jwt" {
|
||||
interface JWT extends DefaultJWT, RefreshTokenError {
|
||||
access_token: string
|
||||
expires_at?: number
|
||||
refresh_token: string
|
||||
loginType: LoginType
|
||||
mfa_scope: boolean
|
||||
mfa_expires_at: number
|
||||
mfa_scope: boolean
|
||||
refresh_token: string
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user