import {useParams} from "react-router-dom"; import {useDataRequest} from "../../../../hooks/dataFetchHook"; import { fetchDayByDayGraph, fetchHourByHourGraph, fetchPunchCardGraph, fetchServerCalendarGraph } from "../../../../service/serverService"; import {ErrorViewBody} from "../../../../views/ErrorView"; import PunchCard from "../../../graphs/PunchCard"; import {useTranslation} from "react-i18next"; import {Card} from "react-bootstrap"; import CardTabs from "../../../CardTabs"; import {faBraille, faChartArea} from "@fortawesome/free-solid-svg-icons"; import {faCalendar} from "@fortawesome/free-regular-svg-icons"; import React from "react"; import TimeByTimeGraph from "../../../graphs/TimeByTimeGraph"; import ServerCalendar from "../../../calendar/ServerCalendar"; import {ChartLoader} from "../../../navigation/Loader"; const DayByDayTab = () => { const {identifier} = useParams(); const {data, loadingError} = useDataRequest(fetchDayByDayGraph, [identifier]) if (loadingError) return if (!data) return ; return } const HourByHourTab = () => { const {identifier} = useParams(); const {data, loadingError} = useDataRequest(fetchHourByHourGraph, [identifier]) if (loadingError) return if (!data) return ; return } const ServerCalendarTab = () => { const {identifier} = useParams(); const {data, loadingError} = useDataRequest(fetchServerCalendarGraph, [identifier]) if (loadingError) return if (!data) return ; return } const PunchCardTab = () => { const {identifier} = useParams(); const {data, loadingError} = useDataRequest(fetchPunchCardGraph, [identifier]) if (loadingError) return if (!data) return ; return } const OnlineActivityGraphsCard = () => { const {t} = useTranslation(); return }, { name: t('html.label.hourByHour'), icon: faChartArea, color: 'blue', href: 'hour-by-hour', element: }, { name: t('html.label.serverCalendar'), icon: faCalendar, color: 'teal', href: 'server-calendar', element: }, { name: t('html.label.punchcard30days'), icon: faBraille, color: 'black', href: 'punchcard', element: }, ]}/> } export default OnlineActivityGraphsCard;