generated from muhtadeetaron/nextjs-template
fixed sliding gallery, fixed styling
This commit is contained in:
@ -5,11 +5,13 @@ import Link from "next/link";
|
||||
import { ReactNode } from "react";
|
||||
import { usePathname } from "next/navigation";
|
||||
import clsx from "clsx";
|
||||
import { House, LayoutGrid, Bookmark, CircleUser } from "lucide-react";
|
||||
|
||||
const tabs = [
|
||||
{ name: "Home", href: "/tabs/home" },
|
||||
{ name: "Profile", href: "/tabs/profile" },
|
||||
{ name: "Leaderboard", href: "/tabs/leaderboard" },
|
||||
{ name: "Home", href: "/home", component: <House size={30} /> },
|
||||
{ name: "Unit", href: "/unit", component: <LayoutGrid size={30} /> },
|
||||
{ name: "Bookmark", href: "/bookmark", component: <Bookmark size={30} /> },
|
||||
{ name: "Profile", href: "/profile", component: <CircleUser size={30} /> },
|
||||
];
|
||||
|
||||
export default function TabsLayout({ children }: { children: ReactNode }) {
|
||||
@ -19,7 +21,7 @@ export default function TabsLayout({ children }: { children: ReactNode }) {
|
||||
<div className="min-h-screen flex flex-col">
|
||||
<main className="flex-1">{children}</main>
|
||||
|
||||
<nav className="flex justify-around border-t p-4 bg-white">
|
||||
<nav className="h-[70px] flex justify-around items-center border-t border-t-neutral-400 p-4 rounded-t-4xl bg-white">
|
||||
{tabs.map((tab) => (
|
||||
<Link
|
||||
key={tab.name}
|
||||
@ -29,7 +31,7 @@ export default function TabsLayout({ children }: { children: ReactNode }) {
|
||||
pathname === tab.href ? "text-blue-600" : "text-gray-500"
|
||||
)}
|
||||
>
|
||||
{tab.name}
|
||||
{tab.component}
|
||||
</Link>
|
||||
))}
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user