tadd select component

This commit is contained in:
Tran Anh Tuan
2025-11-07 15:28:55 +07:00
parent 25b9e831d1
commit f7b05f1e08
7 changed files with 318 additions and 25 deletions

View File

@@ -1,8 +1,8 @@
import { ThemedText } from "@/components/themed-text";
import { ThemedView } from "@/components/themed-view";
import { showToastError } from "@/config";
import { TOKEN } from "@/constants";
import { login } from "@/controller/AuthController";
import { showErrorToast } from "@/services/toast_service";
import {
getStorageItem,
removeStorageItem,
@@ -57,7 +57,7 @@ export default function LoginScreen() {
const handleLogin = async () => {
// Validate input
if (!username.trim() || !password.trim()) {
showToastError("Lỗi", "Vui lòng nhập tài khoản và mật khẩu");
showErrorToast("Vui lòng nhập tài khoản và mật khẩu");
return;
}
@@ -81,8 +81,7 @@ export default function LoginScreen() {
router.replace("/(tabs)");
}
} catch (error) {
showToastError(
"Lỗi",
showErrorToast(
error instanceof Error ? error.message : "Đăng nhập thất bại"
);
} finally {