import React, { useState } from "react"; import { SegmentControl, ReportPage } from "@seasketch/geoprocessing/client-ui"; import ViabilityPage from "../components/ViabilityPage.js"; import RepresentationPage from "../components/RepresentationPage.js"; import { useTranslation } from "react-i18next"; import { Translator } from "../components/TranslatorAsync.js"; const enableAllTabs = false; const BaseReport = () => { const { t } = useTranslation(); const viabilityId = "viability"; const representationId = "representation"; const segments = [ { id: viabilityId, label: t("Viability") }, { id: representationId, label: t("Representation") }, ]; const [tab, setTab] = useState(viabilityId); return ( <>
setTab(segment)} segments={segments} />
); }; // Named export loaded by storybook export const MpaTabReport = () => { // Translator must be in parent FunctionComponent in order for ReportClient to use useTranslate hook return ( ); }; // Default export lazy-loaded by top-level ReportApp export default MpaTabReport;