tadd select component
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user