thêm zustand để cấu hình global state, hook để lấy platform, thêm polyline và polygon b vào map
This commit is contained in:
@@ -2,8 +2,10 @@ import { api } from "@/config";
|
||||
import {
|
||||
API_GET_ALARMS,
|
||||
API_GET_GPS,
|
||||
API_PATH_ENTITIES,
|
||||
API_PATH_SHIP_TRACK_POINTS,
|
||||
} from "@/constants";
|
||||
import { transformEntityResponse } from "@/utils/tranform";
|
||||
|
||||
export async function queryGpsData() {
|
||||
return api.get<Model.GPSResonse>(API_GET_GPS);
|
||||
@@ -16,3 +18,8 @@ export async function queryAlarm() {
|
||||
export async function queryTrackPoints() {
|
||||
return api.get<Model.ShipTrackPoint[]>(API_PATH_SHIP_TRACK_POINTS);
|
||||
}
|
||||
|
||||
export async function queryEntities(): Promise<Model.TransformedEntity[]> {
|
||||
const response = await api.get<Model.EntityResponse[]>(API_PATH_ENTITIES);
|
||||
return response.data.map(transformEntityResponse);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user