Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Admin parent route for the marketing-funnel lead inbox
|
||||
* (Phase 05 Task #78, layer 4).
|
||||
*
|
||||
* Renders an `<Outlet />` for the index list view and the detail view at
|
||||
* `/admin/marketing-leads/:id`. Permission is checked at the loader level
|
||||
* so child loaders inherit the auth gate.
|
||||
*/
|
||||
import { LoaderFunctionArgs, MetaFunction, Outlet } from "react-router";
|
||||
import { getTranslations } from "~/locale/i18next.server";
|
||||
import { verifyUserHasPermission } from "~/utils/helpers/.server/PermissionsService";
|
||||
|
||||
type LoaderData = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
||||
await verifyUserHasPermission(request, "admin.marketing.leads.view");
|
||||
const { t } = await getTranslations(request);
|
||||
const data: LoaderData = {
|
||||
title: `${t("admin.marketingLeads.title")} | ${process.env.APP_NAME}`,
|
||||
};
|
||||
return data;
|
||||
};
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => [{ title: data?.title }];
|
||||
|
||||
export default function MarketingLeadsLayout() {
|
||||
return <Outlet />;
|
||||
}
|
||||
Reference in new issue
Block a user