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">
|
|
|
|
<div className="flex h-10">
|
|
|
|
<div className="tabs tab-boxed w-full">
|
|
|
|
<Link
|
|
|
|
className={`tab basis-1/4 ${
|
2024-04-25 20:48:47 +08:00
|
|
|
pathname === "/bill/recharge"
|
2024-01-03 01:07:16 +08:00
|
|
|
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
|
|
|
|
: "text-[#FFFFFF80]"
|
|
|
|
}`}
|
2024-04-25 20:48:47 +08:00
|
|
|
href="recharge"
|
2024-01-03 01:07:16 +08:00
|
|
|
>
|
2024-04-25 20:48:47 +08:00
|
|
|
充值
|
2024-01-03 01:07:16 +08:00
|
|
|
</Link>
|
|
|
|
<Link
|
|
|
|
className={`tab basis-1/4 ${
|
2024-04-25 20:48:47 +08:00
|
|
|
pathname === "/bill/cost"
|
2024-01-03 01:07:16 +08:00
|
|
|
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
|
|
|
|
: "text-[#FFFFFF80]"
|
|
|
|
}`}
|
2024-04-25 20:48:47 +08:00
|
|
|
href="cost"
|
2024-01-03 01:07:16 +08:00
|
|
|
>
|
2024-04-25 20:48:47 +08:00
|
|
|
消费
|
2024-01-03 01:07:16 +08:00
|
|
|
</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>
|
|
|
|
);
|
|
|
|
}
|