init: Init React Application

This commit is contained in:
2025-05-29 13:21:33 +03:00
parent 9444939507
commit 17de7e495f
66 changed files with 10425 additions and 0 deletions

View File

@ -0,0 +1,28 @@
import { API_URL, authInstance } from "@shared";
import { makeAutoObservable } from "mobx";
class DevicesStore {
devices: any[] = [];
uuid: string | null = null;
sendSnapshotModalOpen = false;
constructor() {
makeAutoObservable(this);
}
getDevices = async () => {
const response = await authInstance.get(`${API_URL}/devices/connected`);
console.log(response.data);
this.devices = response.data;
};
setSelectedDevice = (uuid: string) => {
this.uuid = uuid;
};
toggleSendSnapshotModal = () => {
this.sendSnapshotModalOpen = !this.sendSnapshotModalOpen;
};
}
export const devicesStore = new DevicesStore();