Commit 9f495b63 authored by Hines, Jesse's avatar Hines, Jesse
Browse files

Fix guagues

the maxValue doesn't seem to be properly reactive, so use a loading spinner until the
system info loads first
parent ed247faa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import { Gauge } from "../../shared/plots/gauge";
import { SimulationStatistic } from "../../../models/SimulationStatistic.model";
import { useQuery } from "@tanstack/react-query";
import { getFrontierSystemInformation } from "../../../util/queryOptions";
import { LoadingSpinner } from "../../shared/loadingSpinner";

function GaugeWrapper(props: { children: React.ReactNode }) {
  return (
@@ -21,6 +22,9 @@ export function SimulationGauges({
  statistics?: SimulationStatistic;
}) {
  const { data } = useQuery(getFrontierSystemInformation());
  if (!data) {
    return <LoadingSpinner/>
  }

  return (
    <>