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

View file

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

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 * as React from "react";
import { useTheme } from "next-themes";
export function NameComponent() { export function NameComponent() {
const { theme } = useTheme();
return ( return (
<div className="flex justify-center font-[family-name:var(--font-spacegrotesk-sans)] font-semibold text-fluid tracking-tighter"> <div className="flex justify-center font-[family-name:var(--font-spacegrotesk-sans)] font-semibold text-fluid tracking-tighter">
<p> <p>
<span className="selection:bg-red-500">Ameya </span> <span className="selection:bg-red-500">Ameya </span>
<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 Shenoy
</span> </span>