i18n
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { List } from "@mantine/core";
|
||||
import { useLingui } from "@lingui/react/macro";
|
||||
import ListLink from "@/components/list-link";
|
||||
import {
|
||||
DatabaseIcon,
|
||||
@@ -13,6 +14,7 @@ import { migrateBadgeProgress } from "@/features/badges/server";
|
||||
import { useState } from "react";
|
||||
|
||||
const AdminPage = () => {
|
||||
const { t } = useLingui();
|
||||
const [isMigrating, setIsMigrating] = useState(false);
|
||||
|
||||
const handleMigrateBadges = async () => {
|
||||
@@ -26,35 +28,35 @@ const AdminPage = () => {
|
||||
return (
|
||||
<List p="0">
|
||||
<ListLink
|
||||
label="Manage Tournaments"
|
||||
label={t`Manage Tournaments`}
|
||||
Icon={TrophyIcon}
|
||||
to="/admin/tournaments"
|
||||
/>
|
||||
<ListLink
|
||||
label="Award Badges"
|
||||
label={t`Award Badges`}
|
||||
Icon={CrownIcon}
|
||||
to="/admin/badges"
|
||||
/>
|
||||
<ListButton
|
||||
label="Migrate Badge Progress"
|
||||
label={t`Migrate Badge Progress`}
|
||||
Icon={MedalIcon}
|
||||
onClick={handleMigrateBadges}
|
||||
loading={isMigrating}
|
||||
/>
|
||||
<ListLink
|
||||
label="Activities"
|
||||
label={t`Activities`}
|
||||
Icon={ListIcon}
|
||||
to="/admin/activities"
|
||||
/>
|
||||
<ListButton
|
||||
label="Open Pocketbase"
|
||||
label={t`Open Pocketbase`}
|
||||
Icon={DatabaseIcon}
|
||||
onClick={() =>
|
||||
window.location.replace(process.env.POCKETBASE_URL! + "/_/")
|
||||
}
|
||||
/>
|
||||
<ListLink
|
||||
label="Bracket Preview"
|
||||
label={t`Bracket Preview`}
|
||||
Icon={TreeStructureIcon}
|
||||
to="/admin/preview"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user