Skip to content

Commit

Permalink
testing to add the default english metadata to the base layout
Browse files Browse the repository at this point in the history
  • Loading branch information
joshika39 committed May 29, 2024
1 parent 2a4e78f commit 509862c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from "react";
import {Inter as FontSans} from "next/font/google"
import {cn} from "@/lib/utils";
import {headers} from "next/headers";
import {getDictionary} from "@/i18n/dictionaries";

export const runtime = 'edge';

Expand All @@ -12,8 +13,11 @@ type RootLayoutProps = {
}

export async function generateMetadata(): Promise<Metadata> {
const dict = await getDictionary("en");
return {
metadataBase: new URL(`https://${headers().get("host")}`),
title: dict.common.title,
description: dict.common.description,
};
}

Expand Down

0 comments on commit 509862c

Please sign in to comment.