tiefen_space_web/app/bill/layout.jsx

61 lines
1.8 KiB
React
Raw Normal View History

2024-01-03 01:07:16 +08:00
"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">
2024-06-24 17:51:49 +08:00
{pathname.split("/").length < 4 && (
<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>
2024-01-03 01:07:16 +08:00
</div>
2024-06-24 17:51:49 +08:00
)}
2024-01-03 01:07:16 +08:00
<div className="flex flex-1">{children}</div>
</section>
);
}