refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-25 23:14:27 +08:00
parent 17984a385e
commit 396a296c0b
21 changed files with 73 additions and 95 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import Tooltip from "./Tooltip";
import IssuerList from "./IssuerList";
import useGoogleAuthConfig from "../../../common/hook/useGoogleAuthConfig";
import useGithubAuthConfig from "../../../common/hook/useGithubAuthConfig";
import { LoginConfig } from "../../../types/server";
export default function Logins() {
const {
@@ -25,7 +26,7 @@ export default function Logins() {
} = useGithubAuthConfig();
const { values, updateConfig, setValues, reset, changed } = useConfig("login");
const handleUpdate = async () => {
const { google } = values;
const { google } = values as LoginConfig;
if (changed) {
updateConfig(values);
}