import Link from "next/link"; import type { ServerProps } from "payload"; import { canViewAnalytics } from "@/access"; export function AnalyticsNavLink({ user }: ServerProps) { // Payload's custom views/nav links have no declarative `access` option - // this component must gate itself (see also AdminAnalyticsView.tsx, which // re-checks the same thing for direct navigation to /admin/analytics). if (!canViewAnalytics({ req: { user } } as Parameters[0])) return null; return (
03 Auswertung
); }