"use client"; import { usePathname, useRouter } from "@/i18n"; import clsx from "clsx"; import { FC, PropsWithChildren, ReactNode } from "react"; import "./style.scss"; import { useGlobalStore } from "@/stores"; /** * @description 底部Tab组件 * @param children 插槽内容 * */ export interface FooterProps { children?: ReactNode; } const Footer: FC = () => { const { token } = useGlobalStore(); const tabList = [ { iconSpanName: "icon-home", label: "Início", path: "/", }, { iconSpanName: "icon-qianbao1", label: "Depósito", path: "/deposit", }, { iconSpanName: "icon-afiliado", label: "Afiliado", path: "/affiliate/summary", }, { iconSpanName: "icon-tiyu", label: "Esportes", path: "/", }, { iconSpanName: "icon-yonghu", label: "Perfil", path: "/profile", }, ]; const pathname = usePathname(); const router = useRouter(); const goPage = (path = "/") => { if(!token && (path == '/deposit' || path == "/profile")) { router.replace(`/login?redirect=${path}`) return } router.push(path); }; return (
); }; export default Footer;