"use client"; import { Inter } from "next/font/google"; import React, { useEffect } from "react"; import { usePathname } from "next/navigation"; import "./globals.css"; import BottomNav from "../components/BottomNav"; import { Provider } from "react-redux"; import store from "../store"; import withAuth from "@/components/WithAuth"; const inter = Inter({ subsets: ["latin"] }); const metadata = { title: "铁粉空间", description: "与Ta永不失联", keywords: [ "铁粉空间", "铁粉空间APP", "社交", "网红", "粉丝", "创作者", "变现", "平台", "铁粉", "空间", ], }; // export const viewport = { // width: "device-width", // initialScale: 1, // maximumScale: 1, // userScalable: 0, // }; export default function RootLayout({ children }) { const pathname = usePathname(); useEffect(()=>{ const timer = setTimeout(() => { window.scrollTo({ top: 0, left: 0, behavior: "smooth", // 可选,平滑滚动效果 }); clearTimeout(timer); }, 100); },[pathname]) return (