From 8c384d57231d17ced6289dbf4b9338918a944379 Mon Sep 17 00:00:00 2001 From: callmeyan Date: Thu, 6 Feb 2025 16:19:04 +0800 Subject: [PATCH] fixed: ts build error --- src/hooks/useAuth.ts | 2 +- src/pages/video/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useAuth.ts b/src/hooks/useAuth.ts index db4a502..d226d6d 100644 --- a/src/hooks/useAuth.ts +++ b/src/hooks/useAuth.ts @@ -18,7 +18,7 @@ const clearAuth = () => { localStorage.removeItem(AppConfig.AUTH_TOKEN_KEY); localStorage.removeItem(AppConfig.AUTHED_PERSON_DATA_KEY); } -export const setAuthToken = (token: string | null,profileData:UserProfile|null, expiry_time = -1) => { +export const setAuthToken = (token: string | null,profileData:UserProfile|null = null, expiry_time = -1) => { if (!token) { clearAuth(); return; diff --git a/src/pages/video/index.tsx b/src/pages/video/index.tsx index 8e84de7..00715dc 100644 --- a/src/pages/video/index.tsx +++ b/src/pages/video/index.tsx @@ -156,7 +156,7 @@ export default function VideoIndex() { ref={player} url={state.playVideoUrl} onChange={(state) => { - if (state.end || state.error) setState({playingIndex: -1}) + if (state.end || state.error) setState({playingId: -1}) }} onProgress={(current, duration) => { setState({