From ad2e2650e70906c2c5d4b9e181f8be13756af0d5 Mon Sep 17 00:00:00 2001 From: Song Yangyu Date: Wed, 1 Jan 2025 15:20:09 +0800 Subject: [PATCH] BugFix: login load notes --- src/App.tsx | 2 +- src/components/Login.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 4d87fbb..c1c9133 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -132,7 +132,7 @@ function App() { // 登录后自动同步最近7天的笔记 // TODO: 这个同步目前还有点问题:没能把本地的笔记发出去 -- 应该是因为 state还没更新的原因 - await handleManualSync(); + // await handleManualSync(); }} /> :
diff --git a/src/components/Login.tsx b/src/components/Login.tsx index 2dd1705..f8dbb83 100644 --- a/src/components/Login.tsx +++ b/src/components/Login.tsx @@ -19,7 +19,7 @@ const Login: React.FC<{successCallback: ()=>void }> = ({successCallback}) => { dispatch({ type: 'LOGIN' }); dispatch({ type: 'ADD_TOAST', payload: { id: Date.now(), message: t('login.succeeded'), color: "green" } }); - // TODO: after login logic + successCallback(); } catch (error) { console.error('登录失败:', error); dispatch({ type: 'ADD_TOAST', payload: { id: Date.now(), message: t('login.failed'), color: "red" } });