mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
The command palette (⌘K) already handles direct title search. Replace the redundant /search page with a new /explore page featuring trending titles, popular movies/TV, and genre browsing powered by TMDB discovery endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65 lines
2.1 KiB
TypeScript
65 lines
2.1 KiB
TypeScript
"use client";
|
|
|
|
import { IconCompass, IconHome, IconSettings } from "@tabler/icons-react";
|
|
import { motion } from "motion/react";
|
|
import Link from "next/link";
|
|
import { usePathname } from "next/navigation";
|
|
import { useSession } from "@/lib/auth/client";
|
|
|
|
const tabs = [
|
|
{ href: "/dashboard", label: "Home", icon: IconHome },
|
|
{ href: "/explore", label: "Explore", icon: IconCompass },
|
|
{ href: "/settings", label: "Settings", icon: IconSettings },
|
|
] as const;
|
|
|
|
export function MobileTabBar() {
|
|
const { data: session } = useSession();
|
|
const pathname = usePathname();
|
|
|
|
if (!session?.user) return null;
|
|
|
|
return (
|
|
<nav className="fixed bottom-0 left-0 right-0 z-50 border-t border-border/50 bg-background/90 backdrop-blur-xl sm:hidden">
|
|
<div className="flex h-14 items-stretch">
|
|
{tabs.map((tab) => {
|
|
const Icon = tab.icon;
|
|
const isActive =
|
|
tab.href === "/dashboard"
|
|
? pathname === "/dashboard"
|
|
: pathname.startsWith(tab.href);
|
|
return (
|
|
<Link
|
|
key={tab.href}
|
|
href={tab.href}
|
|
className="relative flex flex-1 flex-col items-center justify-center gap-0.5"
|
|
>
|
|
<Icon
|
|
size={20}
|
|
className={isActive ? "text-primary" : "text-muted-foreground"}
|
|
/>
|
|
<span
|
|
className={`text-[10px] font-medium ${isActive ? "text-primary" : "text-muted-foreground"}`}
|
|
>
|
|
{tab.label}
|
|
</span>
|
|
{isActive && (
|
|
<motion.div
|
|
layoutId="mobile-tab-indicator"
|
|
className="absolute top-0 h-0.5 w-8 rounded-full bg-primary"
|
|
transition={{
|
|
type: "spring",
|
|
stiffness: 380,
|
|
damping: 30,
|
|
}}
|
|
/>
|
|
)}
|
|
</Link>
|
|
);
|
|
})}
|
|
</div>
|
|
{/* Safe area for devices with home indicator */}
|
|
<div className="h-[env(safe-area-inset-bottom)]" />
|
|
</nav>
|
|
);
|
|
}
|