"use client"; import { usePathname } from "next/navigation"; import Link from "next/link"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleLeft } from "@fortawesome/free-solid-svg-icons"; import { useRouter } from "next/navigation"; import { useEffect, useState } from "react"; export default function BillLayout({ children }) { const pathname = usePathname(); const router = useRouter(); const [scrollHeight, setScrollHeight] = useState(0); useEffect(() => { setScrollHeight(window.innerHeight - 44); }, []); return (
{ pathname.split("/").length < 4? router.push("/my/wallet"): router.back(); }} />

收支明细

{pathname.split("/").length < 4 && (
充值 消费 收益 提现
{children}
)} {pathname.split("/").length >3 &&
{children}
}
); }