mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-04 12:40:08 +00:00
feat: menu add back to home item (#89)
* feat: menu add back to home item * chore: auto-fix linting and formatting issues --------- Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,7 @@ import { useMainStore } from "@/hooks/useMainStore"
|
|||||||
import { useMediaQuery } from "@/hooks/useMediaQuery"
|
import { useMediaQuery } from "@/hooks/useMediaQuery"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
import i18next from "i18next"
|
import i18next from "i18next"
|
||||||
import { LogOut, Settings, User2 } from "lucide-react"
|
import { HomeIcon, LogOut, Settings, User2 } from "lucide-react"
|
||||||
import { DateTime } from "luxon"
|
import { DateTime } from "luxon"
|
||||||
import { useEffect, useRef, useState } from "react"
|
import { useEffect, useRef, useState } from "react"
|
||||||
import { useTranslation } from "react-i18next"
|
import { useTranslation } from "react-i18next"
|
||||||
@@ -147,6 +147,18 @@ export default function Header() {
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuGroup>
|
</DropdownMenuGroup>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem
|
||||||
|
onClick={() => {
|
||||||
|
setDropdownOpen(false)
|
||||||
|
navigate("/")
|
||||||
|
}}
|
||||||
|
className="cursor-pointer"
|
||||||
|
>
|
||||||
|
<div className="flex items-center gap-2 w-full">
|
||||||
|
<HomeIcon />
|
||||||
|
{t("BackToHome")}
|
||||||
|
</div>
|
||||||
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={logout}
|
onClick={logout}
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
"Group": "Group",
|
"Group": "Group",
|
||||||
"Profile": "Profile",
|
"Profile": "Profile",
|
||||||
"Settings": "System settings",
|
"Settings": "System settings",
|
||||||
|
"BackToHome": "Back to Home",
|
||||||
"Logout": "Log out",
|
"Logout": "Log out",
|
||||||
"NavigateTo": "Navigate to",
|
"NavigateTo": "Navigate to",
|
||||||
"SelectAPageToNavigateTo": "Choose a page to jump to",
|
"SelectAPageToNavigateTo": "Choose a page to jump to",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
"Group": "分组",
|
"Group": "分组",
|
||||||
"Profile": "个人信息",
|
"Profile": "个人信息",
|
||||||
"Settings": "系统设置",
|
"Settings": "系统设置",
|
||||||
|
"BackToHome": "返回前台",
|
||||||
"Logout": "登出",
|
"Logout": "登出",
|
||||||
"NavigateTo": "导航至",
|
"NavigateTo": "导航至",
|
||||||
"SelectAPageToNavigateTo": "选择一个页面跳转",
|
"SelectAPageToNavigateTo": "选择一个页面跳转",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
"Group": "分組",
|
"Group": "分組",
|
||||||
"Profile": "個人資訊",
|
"Profile": "個人資訊",
|
||||||
"Settings": "系統設定",
|
"Settings": "系統設定",
|
||||||
|
"BackToHome": "返回前台",
|
||||||
"Logout": "登出",
|
"Logout": "登出",
|
||||||
"NavigateTo": "導航至",
|
"NavigateTo": "導航至",
|
||||||
"SelectAPageToNavigateTo": "選擇一個頁面跳轉",
|
"SelectAPageToNavigateTo": "選擇一個頁面跳轉",
|
||||||
|
|||||||
Reference in New Issue
Block a user