Implemented a Zustand-based project_id store, expanded project selection/switching to persist project_id,
and centralized backend requests via api/apiFetch (including data provider updates) to inject X-Project-ID.
This commit is contained in:
@@ -29,6 +29,7 @@ import { TbArrowBackUp, TbArrowForwardUp } from "react-icons/tb";
|
||||
import { FiSkipBack, FiSkipForward } from "react-icons/fi";
|
||||
import { useData } from "../../../app/OlMap/MapComponent";
|
||||
import { config, NETWORK_NAME } from "@/config/config";
|
||||
import { apiFetch } from "@/lib/apiFetch";
|
||||
import { useMap } from "../../../app/OlMap/MapComponent";
|
||||
import { useHealthRisk } from "./HealthRiskContext";
|
||||
import {
|
||||
@@ -422,7 +423,7 @@ const Timeline: React.FC<TimelineProps> = ({
|
||||
undoableTimeout: 3,
|
||||
});
|
||||
try {
|
||||
const response = await fetch(
|
||||
const response = await apiFetch(
|
||||
`${config.BACKEND_URL}/api/v1/composite/pipeline-health-prediction?query_time=${query_time}&network_name=${NETWORK_NAME}`,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user