fix(frontend): device loading + device found message

This commit is contained in:
leandrofars 2024-04-30 10:04:49 -03:00
parent 90042da932
commit cccf28bc03

View File

@ -22,7 +22,7 @@ const Page = () => {
const router = useRouter()
const auth = useAuth();
const [devices, setDevices] = useState([]);
const [deviceFound, setDeviceFound] = useState(false)
const [deviceFound, setDeviceFound] = useState(true)
const [pages, setPages] = useState(0);
const [page, setPage] = useState(null);
const [Loading, setLoading] = useState(true);
@ -104,6 +104,7 @@ const Page = () => {
const fetchDevicePerId = async (id) => {
setLoading(true)
setDeviceFound(true)
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", auth.user.token);