From c628d6b79c68fd7f69033375e8ca3cc1ee403c24 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 10 Apr 2026 23:47:50 +0200 Subject: [PATCH] feat(27-03): remove hero section from landing page - Delete HeroSection function (Discover Gear heading, search bar, Go to Collection link) - Remove unused imports: Link, Search (lucide-react), useAuth, useUIStore - LandingPage now starts directly with PopularSetupsSection - Search now exclusively in TopNav bar --- src/client/routes/index.tsx | 52 +------------------------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/src/client/routes/index.tsx b/src/client/routes/index.tsx index 5cfc7a6..cb07a17 100644 --- a/src/client/routes/index.tsx +++ b/src/client/routes/index.tsx @@ -1,30 +1,19 @@ -import { createFileRoute, Link } from "@tanstack/react-router"; -import { Search } from "lucide-react"; +import { createFileRoute } from "@tanstack/react-router"; import { GlobalItemCard } from "../components/GlobalItemCard"; import { PublicSetupCard } from "../components/PublicSetupCard"; -import { useAuth } from "../hooks/useAuth"; import { useDiscoveryCategories, useDiscoveryItems, useDiscoverySetups, } from "../hooks/useDiscovery"; -import { useUIStore } from "../stores/uiStore"; export const Route = createFileRoute("/")({ component: LandingPage, }); function LandingPage() { - const { data: auth } = useAuth(); - const isAuthenticated = !!auth?.user; - const openCatalogSearch = useUIStore((s) => s.openCatalogSearch); - return (
- openCatalogSearch("collection")} - /> @@ -32,45 +21,6 @@ function LandingPage() { ); } -function HeroSection({ - isAuthenticated, - onSearchFocus, -}: { - isAuthenticated: boolean; - onSearchFocus: () => void; -}) { - return ( -
-

- Discover Gear -

-

Browse what other people carry

-
e.key === "Enter" && onSearchFocus()} - role="button" - tabIndex={0} - className="max-w-xl mx-auto flex items-center gap-3 px-4 py-3 bg-white rounded-xl border border-gray-200 hover:border-gray-300 cursor-pointer shadow-sm transition-all" - > - - - Search the catalog... - -
- {isAuthenticated && ( -
- - Go to Collection - -
- )} -
- ); -} - function PopularSetupsSection() { const { data, isLoading } = useDiscoverySetups(6); const setups = data?.items ?? [];