From 231f483876678f2ef79391a32e83b09c9721d4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=93=E9=BC=A0?= <71394853+hamster1963@users.noreply.github.com> Date: Sat, 4 Jan 2025 18:42:58 +0800 Subject: [PATCH] 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 --- src/components/header.tsx | 14 +++++++++++++- src/locales/en/translation.json | 1 + src/locales/zh-CN/translation.json | 1 + src/locales/zh-TW/translation.json | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/header.tsx b/src/components/header.tsx index 80661c2..b474db0 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -20,7 +20,7 @@ import { useMainStore } from "@/hooks/useMainStore" import { useMediaQuery } from "@/hooks/useMediaQuery" import { cn } from "@/lib/utils" import i18next from "i18next" -import { LogOut, Settings, User2 } from "lucide-react" +import { HomeIcon, LogOut, Settings, User2 } from "lucide-react" import { DateTime } from "luxon" import { useEffect, useRef, useState } from "react" import { useTranslation } from "react-i18next" @@ -147,6 +147,18 @@ export default function Header() { + { + setDropdownOpen(false) + navigate("/") + }} + className="cursor-pointer" + > +
+ + {t("BackToHome")} +
+