ldc-ovoteam/resources/ts/back/Components/Layout/Sidebar/Links/ActivityLogs.tsx
Jérémy Munsch cd2d8ed397
refactor(i18n): replace GetTranslation with trans function
- Updated translation utility to improve consistency and reduce redundancy.
- Removed deprecated useTrans hook and related code.
- Introduced a new Zustand store for managing translations and locale settings.
- Cleaned up unused hooks and files related to localization.
2026-10-19 17:43:33 +02:00

23 lines
795 B
TypeScript

import { HistoryIcon } from "lucide-react";
import { type NavListLinksProps } from "@/back/Components/Layout/Sidebar/AppSidebar";
import { type SidebarGroupLink } from "@/back/Components/Layout/Sidebar/SidebarRegistry";
import type { AuthProp } from "@/back/types/global";
import str from "@/hooks/use-string";
import trans from "@/hooks/use-translations";
export default function ActivityLogs(auth: AuthProp): SidebarGroupLink {
const modelName = "activity-logs";
const transActivityLogs = trans(`uwil-backend::models.classes.${modelName}`, {
choice: 2,
});
const link: NavListLinksProps = {
title: str(transActivityLogs).ucFirst().value(),
model: modelName,
icon: HistoryIcon,
show: auth.policies.activityLogs.viewAny,
};
return { link, group: "admin" };
}