feat: hydration issue fixed

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
Ameya Shenoy 2025-06-04 22:26:04 +05:30
parent b7d67fbd60
commit 3a9b5a38af
5 changed files with 25 additions and 14 deletions

View file

@ -0,0 +1,7 @@
export default function Home() {
return (
<main className="flex items-center justify-center h-screen">
This is blog list page
</main>
);
}

View file

@ -3,6 +3,8 @@ import { ThemeProvider } from "@/components/theme-provider";
import { Geist, Geist_Mono, Space_Grotesk } from "next/font/google";
import "./globals.css";
import { NavigationMenu } from "@/components/Navbar";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
@ -40,7 +42,12 @@ export default function RootLayout({
enableSystem
disableTransitionOnChange
>
<div className="min-h-screen">
<NavigationMenu />
{children}
<footer className=""></footer>
</div>
</ThemeProvider>
</body>
</html>

View file

@ -1,14 +1,9 @@
import { NavigationMenu } from "@/components/Navbar";
import { NameComponent } from "@/components/NameComponent";
export default function Home() {
return (
<div className="min-h-screen">
<NavigationMenu />
<main className="flex items-center justify-center h-screen">
<NameComponent />
</main>
<footer className=""></footer>
</div>
<main className="flex items-center justify-center h-screen">
<NameComponent />
</main>
);
}

View file

@ -0,0 +1,7 @@
export default function Home() {
return (
<main className="flex items-center justify-center h-screen">
This is portfolio
</main>
);
}

View file

@ -1,17 +1,12 @@
"use client";
import * as React from "react";
import { useTheme } from "next-themes";
export function NameComponent() {
const { theme } = useTheme();
return (
<div className="flex justify-center font-[family-name:var(--font-spacegrotesk-sans)] font-semibold text-fluid tracking-tighter">
<p>
<span className="selection:bg-red-500">Ameya </span>
<span
className={`text-red-500 ${theme === "light" ? "selection:bg-black" : "selection:bg-white"}`}
className={`text-red-500 selection:bg-black dark:selection:bg-white`}
>
Shenoy
</span>