import { useState } from "react"; import { get_average_time_function } from "../api/axios_methods"; function write_average_time(prefix, time) { return ( <>
{prefix}
{time}
> ); } export function Average() { const get_av_time_api = get_average_time_function(); const [time_all, set_time_all] = useState(""); const [time_low, set_time_low] = useState(""); const [time_med, set_time_med] = useState(""); const [time_high, set_time_high] = useState(""); get_av_time_api(set_time_all, "All"); get_av_time_api(set_time_low, "Low"); get_av_time_api(set_time_med, "Medium"); get_av_time_api(set_time_high, "High"); return (