Refactor code structure for improved readability and maintainability
This commit is contained in:
+30
-15
@@ -1,29 +1,44 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import localFont from "next/font/local";
|
||||
import "./globals.css";
|
||||
import SmoothScroller from "@/components/dom/SmoothScroller";
|
||||
import Header from "@/components/dom/Header";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
const tiktokSans = localFont({
|
||||
src: "./fonts/TikTokSans.ttf",
|
||||
variable: "--font-tiktok",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
const geistMono = localFont({
|
||||
src: "./fonts/GeistMono[wght].ttf",
|
||||
variable: "--font-mono",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const departureMono = localFont({
|
||||
src: "./fonts/DepartureMono-Regular.otf",
|
||||
variable: "--font-mono-2",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
title: "HAOQI©2026 - Clone",
|
||||
description: "Digital Product Designer & Builder © 2026",
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: LayoutProps<"/">) {
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
>
|
||||
<body className="min-h-full flex flex-col">{children}</body>
|
||||
<html lang="en" className={`${tiktokSans.variable} ${geistMono.variable} ${departureMono.variable}`}>
|
||||
<body className="bg-dot-grid min-h-screen">
|
||||
<SmoothScroller />
|
||||
<Header />
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user