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": {
|
||||
"Dashboard": "Dashboard",
|
||||
"Settings": "Settings",
|
||||
"LogIn": "LogIn",
|
||||
"LogOut": "LogOut"
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
}
|
||||
},
|
||||
"UserAvatar": {
|
||||
"Dashboard": "仪表板",
|
||||
"Settings": "设置",
|
||||
"LogIn": "登录",
|
||||
"LogOut": "登出"
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
"use client";
|
||||
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { LayoutDashboardIcon } from "lucide-react";
|
||||
import { DropdownMenuItem } from "./ui/dropdown-menu";
|
||||
|
||||
export const DashboardButton = () => {
|
||||
const router = useRouter();
|
||||
const t = useTranslations("UserAvatar");
|
||||
|
||||
return (
|
||||
<DropdownMenuItem onClick={() => router.push("/dashboard")}>
|
||||
<LayoutDashboardIcon />
|
||||
Dashboard
|
||||
{t("Dashboard")}
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user