Skip to content

Commit 0a0d04f

Browse files
authored
fix: build error fix for meta tags (#6)
1 parent f5a2f11 commit 0a0d04f

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/app/about/[slug]/layout.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
import React from "react";
22
import Image from "next/image";
33
import Link from "next/link";
4-
import { DynamicPagePropsType } from "@/app/types";
5-
import { Metadata } from "next/types";
6-
import { removeDashAndCapitalize } from "@/utils/utils";
7-
8-
export async function generateMetadata({ params }: DynamicPagePropsType): Promise<Metadata> {
9-
const slug = (await params).slug
10-
11-
return {
12-
title: removeDashAndCapitalize(slug),
13-
description: ""
14-
};
15-
}
164

175
const Layout = ({
186
children,

src/app/about/[slug]/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@ import Image from "next/image";
44
import { twMerge } from "tailwind-merge";
55
import TeamCard from "../components/TeamCard";
66
import { DynamicPagePropsType } from "@/app/types";
7+
import { Metadata } from "next/types";
8+
import { removeDashAndCapitalize } from "@/utils/utils";
79

810
export const dynamicParams = false;
911

12+
export async function generateMetadata({ params }: DynamicPagePropsType): Promise<Metadata> {
13+
const slug = (await params).slug
14+
15+
return {
16+
title: removeDashAndCapitalize(slug),
17+
description: ""
18+
};
19+
}
20+
1021
export async function generateStaticParams() {
1122
return Object.keys(aboutPageData).map((pageName) => ({
1223
slug: pageName,

0 commit comments

Comments
 (0)