Skip to content

Commit

Permalink
Radhey Radhey
Browse files Browse the repository at this point in the history
  • Loading branch information
samanyougarg committed Dec 31, 2024
1 parent 1ae8784 commit fb6ef3a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,10 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: ReactNode }) {
const headersList = headers();
const pathname = headersList.get("x-invoke-path") || "";

// Extract locale from path similar to pages
const pathParts = pathname.split("/").filter(Boolean);
const lastPart = pathParts[pathParts.length - 1];
const htmlLang = lastPart === "hi" ? "hi" : "en";
const htmlLang = pathname.includes("/hi") ? "hi" : "en";

// Log for debugging
console.log("[RootLayout] Path:", pathname);
console.log("[RootLayout] Path parts:", pathParts);
console.log("[RootLayout] Last part:", lastPart);
console.log("[RootLayout] Using HTML lang:", htmlLang);

return (
Expand Down

0 comments on commit fb6ef3a

Please sign in to comment.