mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-13 22:20:58 +00:00
Add User Card and Logout Button to Sidebar (#1405)
* feat: add user card and logout button to sidebar Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * feat: add test code to set dummy values in localStorage Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * style: fix formatting issues in HomeSidebar.tsx Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * style: fix whitespace in HomeSidebar.tsx Co-Authored-By: Junyan Qin <Chin> <rockchinq@gmail.com> * perf: styles of logout button * fix: lint errors * fix: lint errors --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Junyan Qin <Chin> <rockchinq@gmail.com>
This commit is contained in:
committed by
GitHub
parent
18c708da58
commit
039752419b
@@ -82,6 +82,7 @@ export default function Login() {
|
||||
.authUser(username, password)
|
||||
.then((res) => {
|
||||
localStorage.setItem('token', res.token);
|
||||
localStorage.setItem('userEmail', username);
|
||||
console.log('login success: ', res);
|
||||
router.push('/home');
|
||||
toast.success('登录成功');
|
||||
|
||||
Reference in New Issue
Block a user