thêm quét QR đăng nhập, sửa lại logic để gọi api bằng ip thiết bị

This commit is contained in:
Tran Anh Tuan
2025-11-10 16:12:52 +07:00
parent c26de5aefc
commit 1a534eccb0
10 changed files with 224 additions and 218 deletions

View File

@@ -1,9 +1,9 @@
import { showToastError } from "@/config";
import {
queryDeleteSos,
queryGetSos,
querySendSosMessage,
} from "@/controller/DeviceController";
import { showErrorToast } from "@/services/toast_service";
import { sosMessage } from "@/utils/sosUtils";
import { MaterialIcons } from "@expo/vector-icons";
import { useEffect, useState } from "react";
@@ -108,7 +108,7 @@ const SosButton = () => {
}
} catch (error) {
console.error("Error when send sos: ", error);
showToastError("Không thể gửi tín hiệu SOS", "Lỗi");
showErrorToast("Không thể gửi tín hiệu SOS");
}
};