import type { Metadata } from "next";
|
import { Inter } from "next/font/google";
|
import "./globals.css";
|
import ClientLayoutContent from '@/components/layout/ClientLayoutContent';
|
import Script from 'next/script';
|
|
const inter = Inter({ subsets: ["latin"] });
|
|
export const metadata: Metadata = {
|
title: "帷幄君成 - 数字员工平台",
|
description: "智能物流解决方案",
|
icons: {
|
icon: '/logo.svg',
|
apple: '/logo.svg',
|
},
|
};
|
|
const ScrollToTop = () => {
|
return (
|
<Script id="scroll-to-top">
|
{`
|
if (typeof window !== 'undefined') {
|
window.onload = function() {
|
window.scrollTo(0, 0);
|
}
|
}
|
`}
|
</Script>
|
);
|
};
|
|
export default function RootLayout({
|
children,
|
}: {
|
children: React.ReactNode;
|
}) {
|
return (
|
<html lang="zh-CN" className="smooth-scroll">
|
<ScrollToTop />
|
<body className={`${inter.className} overflow-x-hidden`}>
|
<ClientLayoutContent>{children}</ClientLayoutContent>
|
</body>
|
</html>
|
);
|
}
|