mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
fix types issue
This commit is contained in:
1 parent
ec63bba0fe
commit
807974d727
15 files changed
+49
-25
No files matched your search
@@ -40,8 +40,9 @@ async function handleSubmit({
|
||||
error,
|
||||
}: {
|
||||
username: string
|
||||
success: any
|
||||
error: any
|
||||
success: () => void
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
error: (msg: string) => void
|
||||
}) {
|
||||
try {
|
||||
await chooseUsername(username)
|
||||
|
||||
@@ -17,8 +17,9 @@ const handleLogin = async ({
|
||||
}: {
|
||||
username: string
|
||||
password: string
|
||||
success: any
|
||||
error: any
|
||||
success: () => void
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
error: (msg: string) => void
|
||||
}) => {
|
||||
try {
|
||||
const isSuccess = await login(username, password)
|
||||
|
||||
@@ -22,8 +22,9 @@ function handleRegister({
|
||||
username: string
|
||||
email: string
|
||||
password: string
|
||||
success: any
|
||||
error: any
|
||||
success: () => void
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
error: (msg: string) => void
|
||||
}) {
|
||||
register(username, email, password)
|
||||
.then(success)
|
||||
@@ -54,7 +55,8 @@ async function check({
|
||||
username: string
|
||||
email: string
|
||||
password: string
|
||||
error: any
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
error: (msg: string) => void
|
||||
}) {
|
||||
if (username && !isValidUsername(username)) {
|
||||
error('無效的帳號名稱')
|
||||
|
||||
Reference in new issue
Block a user