Skip to content

Commit ee18e79

Browse files
Jay PanchalJay Panchal
authored andcommitted
fix: error in tag pages
1 parent 345db70 commit ee18e79

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import PageNavbar from "@/components/PageNavbar";
2-
import Image from "next/image";
32
import { twMerge } from "tailwind-merge";
43
import Consultation from "../../../components/Consultation";
54
import Pointers from "../../../components/Pointers";
@@ -42,22 +41,6 @@ export default async function Page({
4241
mobile={pageData.heroSection.images.mobile}
4342
alt='Digital ventures image'
4443
/>
45-
<div className="mt-10 mb-12 lg:mt-12 pl-[7vw]">
46-
<Image
47-
className="hidden max-w-full rounded-l-full lg:block"
48-
width={1920}
49-
height={599}
50-
src={pageData.heroSection.images.desktop}
51-
alt="Digital ventures image"
52-
/>
53-
<Image
54-
className="block max-w-full rounded-l-full lg:hidden"
55-
width={800}
56-
height={517}
57-
src={pageData.heroSection.images.mobile}
58-
alt="Digital ventures image"
59-
/>
60-
</div>
6144
<h4 className="block max-w-[50rem] -mb-16 font-light text-xl container-padding lg:hidden">
6245
{pageData.heroSection.description}
6346
</h4>

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ import { blogsPageData, caseStudiesData } from "@/data";
33
import Link from "next/link";
44
import { notFound } from "next/navigation";
55

6+
export async function generateStaticParams() {
7+
const allTags = [
8+
...Object.values(blogsPageData).flatMap((blog) => blog.tags),
9+
...Object.values(caseStudiesData).flatMap((caseStudy) => caseStudy.services),
10+
];
11+
12+
const uniqueTags = Array.from(
13+
new Set(allTags.map((tag) => tag.id))
14+
);
15+
16+
return uniqueTags.map((id) => ({ slug: id }));
17+
}
18+
619
export default async function Page({
720
params,
821
}: {

0 commit comments

Comments
 (0)