Skip to content

Commit

Permalink
fix: 🐛 fix hydration error
Browse files Browse the repository at this point in the history
  • Loading branch information
okaziya committed Jan 15, 2025
1 parent ac69482 commit 1c7c6ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
12 changes: 5 additions & 7 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ export default function LocaleLayout({
const { locale } = params;

return (
<html lang={locale}>
<body>
<Header locale={locale} />
<main className="main-content m-auto">{children}</main>
<Footer locale={locale} />
</body>
</html>
<>
<Header locale={locale} />
<main className="main-content m-auto">{children}</main>
<Footer locale={locale} />
</>
);
}
17 changes: 13 additions & 4 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,26 @@ import { SITE_INFO } from "../config";

import { ReactNode } from "react";
import ThemeWrapper from "../components/ThemeWrapper";

import { nunitoSans } from "../styles/fonts";
import { Locale } from "../types";

export const metadata = {
title: SITE_INFO.title,
describtion: SITE_INFO.description,
description: SITE_INFO.description,
icons: {
icon: `${process.env.NEXT_PUBLIC_BASE_PATH}/favicon.ico`,
},
};

export default function RootLayout({ children }: { children: ReactNode }) {
export default function RootLayout({
children,
params,
}: {
children: ReactNode;
params: { locale: Locale };
}) {
return (
<html>
<html lang={params.locale}>
<body className={nunitoSans.className}>
<ThemeWrapper>{children}</ThemeWrapper>
</body>
Expand Down

0 comments on commit 1c7c6ef

Please sign in to comment.