Files
flxn-app/src/app/routes/_authed/admin.tsx
T
kyle 0a7b5fa00f
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Successful in 8s
CI/CD Pipeline / i18n Catalog Check (push) Failing after 10s
CI/CD Pipeline / Build and Push App Docker Image (push) Skipped
CI/CD Pipeline / Deploy to Kubernetes (push) Skipped
i18n
2026-08-08 15:29:40 -07:00

21 lines
549 B
TypeScript

import { Outlet, redirect, createFileRoute } from "@tanstack/react-router";
import { msg } from "@lingui/core/macro";
import type { HeaderConfig } from "@/features/core/types/header-config";
export const Route = createFileRoute("/_authed/admin")({
component: Outlet,
beforeLoad: ({ context }) => {
if (!context.auth?.roles?.includes("Admin")) {
throw redirect({ to: "/" });
}
const header: HeaderConfig = {
...context.header,
title: msg`Admin`,
withBackButton: true,
};
return { header };
},
});