Files
HiveGrid-Wireframes/hivegrid-cloud/apps/web/app/components/pages/PageFeatureDisabled.tsx
T

33 lines
1.0 KiB
TypeScript

import { Link } from "react-router";
import { useTranslation } from "react-i18next";
import { ErrorPage } from "~/components/ui/errors/ErrorPage";
export interface PageFeatureDisabledProps {
featureLabel?: string;
dashboardPath?: string;
}
export default function PageFeatureDisabled({ featureLabel, dashboardPath = "/dashboard" }: PageFeatureDisabledProps) {
const { t } = useTranslation();
const featureCopy = featureLabel
? t("access.featureDisabled.namedDescription", { feature: featureLabel })
: t("access.featureDisabled.description");
return (
<ErrorPage
status={403}
eyebrow={t("access.featureDisabled.eyebrow")}
title={t("access.featureDisabled.title")}
description={t("access.featureDisabled.fullDescription", {
featureCopy,
})}
withGoBack={false}
actionSlot={
<Link to={dashboardPath} className="text-primary hover:text-primary/90 text-sm font-medium underline">
{t("access.featureDisabled.backToDashboard")}
</Link>
}
/>
);
}