mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2026-05-31 10:18:52 +00:00
fix(i18n): localize dashboard menu item
This commit is contained in:
parent
ed547d4f97
commit
b2505eda46
@ -8,6 +8,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"UserAvatar": {
|
"UserAvatar": {
|
||||||
|
"Dashboard": "Dashboard",
|
||||||
"Settings": "Settings",
|
"Settings": "Settings",
|
||||||
"LogIn": "LogIn",
|
"LogIn": "LogIn",
|
||||||
"LogOut": "LogOut"
|
"LogOut": "LogOut"
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"UserAvatar": {
|
"UserAvatar": {
|
||||||
|
"Dashboard": "仪表板",
|
||||||
"Settings": "设置",
|
"Settings": "设置",
|
||||||
"LogIn": "登录",
|
"LogIn": "登录",
|
||||||
"LogOut": "登出"
|
"LogOut": "登出"
|
||||||
|
|||||||
@ -1,16 +1,18 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
import { LayoutDashboardIcon } from "lucide-react";
|
import { LayoutDashboardIcon } from "lucide-react";
|
||||||
import { DropdownMenuItem } from "./ui/dropdown-menu";
|
import { DropdownMenuItem } from "./ui/dropdown-menu";
|
||||||
|
|
||||||
export const DashboardButton = () => {
|
export const DashboardButton = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const t = useTranslations("UserAvatar");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenuItem onClick={() => router.push("/dashboard")}>
|
<DropdownMenuItem onClick={() => router.push("/dashboard")}>
|
||||||
<LayoutDashboardIcon />
|
<LayoutDashboardIcon />
|
||||||
Dashboard
|
{t("Dashboard")}
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user