mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-20 09:20:59 +00:00
perf: detailed control of models service displaying
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
FormMessage,
|
||||
} from '@/components/ui/form';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { httpClient } from '@/app/infra/http/HttpClient';
|
||||
import { httpClient, initializeUserInfo } from '@/app/infra/http';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Mail, Lock, Loader2 } from 'lucide-react';
|
||||
import langbotIcon from '@/app/assets/langbot-logo.webp';
|
||||
@@ -95,9 +95,10 @@ export default function Login() {
|
||||
function handleLogin(username: string, password: string) {
|
||||
httpClient
|
||||
.authUser(username, password)
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
localStorage.setItem('token', res.token);
|
||||
localStorage.setItem('userEmail', username);
|
||||
await initializeUserInfo();
|
||||
router.push('/home');
|
||||
toast.success(t('common.loginSuccess'));
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user