import {useTranslation} from "react-i18next"; import {Card, Col, Dropdown, Row} from "react-bootstrap"; import {FontAwesomeIcon as Fa} from "@fortawesome/react-fontawesome"; import React, {useState} from "react"; import {faExclamationTriangle, faGlobe, faLayerGroup} from "@fortawesome/free-solid-svg-icons"; import GeolocationBarGraph from "../../graphs/GeolocationBarGraph"; import GeolocationWorldMap, {ProjectionOptions} from "../../graphs/GeolocationWorldMap"; import {CardLoader} from "../../navigation/Loader"; const ProjectionDropDown = ({projection, setProjection}) => { const {t} = useTranslation(); const projectionOptions = Object.values(ProjectionOptions); return ( {t(projection)}
{t('html.label.geoProjection.dropdown')}
{projectionOptions.map((option, i) => ( setProjection(option)}> {t(option)} ))}
) } const GeolocationsCard = ({data}) => { const {t} = useTranslation(); const [projection, setProjection] = useState(ProjectionOptions.MILLER); if (!data) return if (!data?.geolocations_enabled) { return (
{' '}{t('html.description.noGeolocations')}
) } return (
{t('html.label.geolocations')}
) } export default GeolocationsCard;