From 615f2036808fe5538c040f25cf4e55d59cb47cd3 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Sun, 5 Jan 2025 21:48:36 +0800 Subject: [PATCH] feat: add back to home link on mobile --- src/components/header.tsx | 49 +++++++++++++++------------ src/components/ui/navigation-menu.tsx | 2 +- src/routes/login.tsx | 2 +- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/components/header.tsx b/src/components/header.tsx index 0db0d95..774ef5e 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 { HomeIcon, LogOut, Settings, User2 } from "lucide-react" +import { LogOut, Settings, User2 } from "lucide-react" import { DateTime } from "luxon" import { useEffect, useRef, useState } from "react" import { useTranslation } from "react-i18next" @@ -28,7 +28,6 @@ import { Link, useLocation, useNavigate } from "react-router-dom" import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar" import { Button } from "./ui/button" -import { Card } from "./ui/card" import { DropdownMenu, DropdownMenuContent, @@ -76,7 +75,7 @@ export default function Header() { className={cn( "absolute right-0 z-[9999] top-11 w-20 scale-100 pointer-events-none", { - "top-2 right-4": location.pathname === "/dashboard/login", + hidden: location.pathname === "/dashboard/login", }, )} alt={"animated-man"} @@ -87,7 +86,10 @@ export default function Header() {