tiefen_space_web/app/bill/layout.jsx

58 lines
1.6 KiB
JavaScript

"use client";
import { usePathname } from "next/navigation";
import Link from "next/link";
export default function BillLayout({ children }) {
const pathname = usePathname();
return (
<section className="flex flex-1 flex-col container px-4 py-2">
<div className="flex h-10">
<div className="tabs tab-boxed w-full">
<Link
className={`tab basis-1/4 ${
pathname === "/bill/recharge"
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
: "text-[#FFFFFF80]"
}`}
href="recharge"
>
充值
</Link>
<Link
className={`tab basis-1/4 ${
pathname === "/bill/cost"
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
: "text-[#FFFFFF80]"
}`}
href="cost"
>
消费
</Link>
<Link
className={`tab basis-1/4 ${
pathname === "/bill/income"
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
: "text-[#FFFFFF80]"
}`}
href="income"
>
收益
</Link>
<Link
className={`tab basis-1/4 ${
pathname === "/bill/withdrawal"
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
: "text-[#FFFFFF80]"
}`}
href="withdrawal"
>
提现
</Link>
</div>
</div>
<div className="flex flex-1">{children}</div>
</section>
);
}