mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-18 23:45:26 +02:00
fix: tsc fixes
This commit is contained in:
parent
63605bf5da
commit
a893501154
@ -60,13 +60,13 @@
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/node": "^18.11.18",
|
||||
"@types/openpgp": "^4.4.18",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@types/react-icons": "^3.0.0",
|
||||
"@types/react-router": "^5.1.19",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"@types/secure-random-password": "^0.2.1",
|
||||
"@types/sort-array": "^4.1.0",
|
||||
"@types/ua-parser-js": "^0.7.36",
|
||||
"@types/yup": "^0.32.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
||||
"@typescript-eslint/parser": "^5.40.0",
|
||||
"@vitejs/plugin-react": "^2.1.0",
|
||||
|
@ -79,7 +79,7 @@ export default function useMasterPassword(user: User | ServerUser | null): UseMa
|
||||
decryptUsingMasterPassword,
|
||||
decryptUsingPrivateKey,
|
||||
logout,
|
||||
setEncryptionPassword,
|
||||
setEncryptionPassword: setEncryptionPassword as Dispatch<SetStateAction<string | null>>,
|
||||
_encryptionPassword: encryptionPassword!,
|
||||
decryptionPasswordHash: fastHashCode(encryptionPassword || "").toString(),
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ export default function AliasTypeIndicator({type}: AliasTypeIndicatorProps): Rea
|
||||
const {t} = useTranslation()
|
||||
|
||||
return (
|
||||
// @ts-ignore
|
||||
<Tooltip title={t(ALIAS_TYPE_TOOLTIP_MAP[type] as string)} arrow>
|
||||
<Box display="flex" justifyContent="center" alignItems="center">
|
||||
{ALIAS_TYPE_ICON_MAP[type]}
|
||||
|
@ -6,7 +6,7 @@ import {ExtensionKleckEvent, ExtensionKleckMessageLatestAlias} from "~/extension
|
||||
export interface UseExtensionHandlerData {
|
||||
onEnterPassword?: () => void
|
||||
onRefetchAliases?: () => void
|
||||
onLatestAliasChange?: ({latestAliasId}: ExtensionKleckMessageLatestAlias["data"]) => void
|
||||
onLatestAliasChange?: ({latestAlias}: ExtensionKleckMessageLatestAlias["data"]) => void
|
||||
}
|
||||
|
||||
export default function useExtensionHandler({
|
||||
|
@ -6,9 +6,9 @@ import React, {ReactElement} from "react"
|
||||
|
||||
import {useMutation} from "@tanstack/react-query"
|
||||
|
||||
import {ResendEmailLoginCodeResponse, resendEmailLoginCode} from "~/apis"
|
||||
import {resendEmailLoginCode} from "~/apis"
|
||||
import {MutationStatusSnackbar, TimedButton} from "~/components"
|
||||
import {ServerSettings} from "~/server-types"
|
||||
import {ServerSettings, SimpleDetailResponse} from "~/server-types"
|
||||
|
||||
export interface ResendMailButtonProps {
|
||||
email: string
|
||||
@ -22,7 +22,7 @@ export default function ResendMailButton({
|
||||
const settings = useLoaderData() as ServerSettings
|
||||
const {t} = useTranslation()
|
||||
|
||||
const mutation = useMutation<ResendEmailLoginCodeResponse, AxiosError, void>(() =>
|
||||
const mutation = useMutation<SimpleDetailResponse, AxiosError, void>(() =>
|
||||
resendEmailLoginCode({
|
||||
email,
|
||||
sameRequestToken,
|
||||
|
@ -114,7 +114,7 @@ export default function AliasUsersList({users, queryKey, id}: AliasUsersListProp
|
||||
try {
|
||||
await mutateAsync(values.users)
|
||||
} catch (error) {
|
||||
setErrors(parseFastAPIError(error as AxiosError))
|
||||
setErrors(parseFastAPIError(error as AxiosError) as any)
|
||||
}
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user