Skip to content

Commit

Permalink
BugFix: login load notes
Browse files Browse the repository at this point in the history
  • Loading branch information
flyfy1 committed Jan 1, 2025
1 parent f856dab commit ad2e265
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function App() {

// 登录后自动同步最近7天的笔记
// TODO: 这个同步目前还有点问题:没能把本地的笔记发出去 -- 应该是因为 state还没更新的原因
await handleManualSync();
// await handleManualSync();
}} /> :
<div className="notes-container">
<div className="flex justify-between items-center">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" } });
Expand Down

0 comments on commit ad2e265

Please sign in to comment.