i18n
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

This commit is contained in:
2026-08-08 15:29:40 -07:00
parent 22c282d8fa
commit 0a7b5fa00f
178 changed files with 13099 additions and 1285 deletions
+12 -8
View File
@@ -1,27 +1,30 @@
import { HouseIcon, RankingIcon, ShieldIcon, TrophyIcon, UserCircleIcon } from "@phosphor-icons/react";
import { useMemo } from "react";
import { useLingui } from "@lingui/react/macro";
export const useLinks = (userId: string | undefined, roles: string[]) =>
useMemo(() => {
export const useLinks = (userId: string | undefined, roles: string[]) => {
const { t } = useLingui();
return useMemo(() => {
const links = [
{
label: 'Home',
label: t`Home`,
href: '/',
Icon: HouseIcon
},
{
label: 'Statistics',
label: t`Statistics`,
href: '/stats',
Icon: RankingIcon
},
{
label: 'Tournaments',
label: t`Tournaments`,
href: '/tournaments',
Icon: TrophyIcon,
exclude: ['/admin/tournaments']
},
{
label: 'Profile',
label: t`Profile`,
href: `/profile/${userId}`,
Icon: UserCircleIcon,
include: ['/settings']
@@ -30,11 +33,12 @@ export const useLinks = (userId: string | undefined, roles: string[]) =>
if (roles.includes('Admin')) {
links.push({
label: 'Admin',
label: t`Admin`,
href: '/admin',
Icon: ShieldIcon
})
}
return links;
}, [userId, roles]);
}, [userId, roles, t]);
};