diff --git a/apps/nowcasting-app/components/charts/ChartLegend.tsx b/apps/nowcasting-app/components/charts/ChartLegend.tsx index 81756c11..aad4cad8 100644 --- a/apps/nowcasting-app/components/charts/ChartLegend.tsx +++ b/apps/nowcasting-app/components/charts/ChartLegend.tsx @@ -3,18 +3,16 @@ import { ChartInfo } from "../../ChartInfo"; import { InfoIcon, LegendLineGraphIcon } from "../icons/icons"; import { FC, useEffect } from "react"; import useGlobalState from "../helpers/globalState"; -import { getRounded4HoursAgoString } from "../helpers/utils"; import LegendItem from "./LegendItem"; -import { NHR_FORECAST_OPTIONS } from "../../constant"; +import { N_HOUR_FORECAST_OPTIONS } from "../../constant"; type ChartLegendProps = { className?: string; }; export const ChartLegend: FC = ({ className }) => { - const [showNhrView] = useGlobalState("show4hView"); + const [showNHourView] = useGlobalState("showNHourView"); const [nHourForecast, setNHourForecast] = useGlobalState("nHourForecast"); - const fourHoursAgo = getRounded4HoursAgoString(); const legendItemContainerClasses = `flex flex-initial flex-col @sm:gap-1 @6xl:gap-6 @6xl:flex-row ${ className ? ` ${className}` : "" }`; @@ -49,12 +47,12 @@ export const ChartLegend: FC = ({ className }) => { {/* label={"OCF Final Forecast"}*/} {/* dataKey={`PAST_FORECAST`}*/} {/*/>*/} - {showNhrView && ( + {showNHourView && ( )} @@ -67,9 +65,9 @@ export const ChartLegend: FC = ({ className }) => { onChange={(e) => setNHourForecast(Number(e.target.value))} className="text-sm px-2 py-0 rounded-md" > - {NHR_FORECAST_OPTIONS.map((option) => ( + {N_HOUR_FORECAST_OPTIONS.map((option) => (