import { useLocation } from "react-router"; import clsx from "clsx"; import UrlUtils from "~/utils/app/UrlUtils"; import { useTranslation } from "react-i18next"; export default function HeadingWithTabs({ tabs }: { tabs: { name: string; href: string }[] }) { const { t } = useTranslation(); const location = useLocation(); function isCurrent(idx: number) { return currentTab() === tabs[idx]; } const currentTab = () => { return tabs.find((element) => element.href && UrlUtils.stripTrailingSlash(location.pathname) === UrlUtils.stripTrailingSlash(element.href)); }; return (

{t("components.tabs.headingWithTabs.issues")}

); }