From b3f774178410f3fdf0fda4a1e549c3c2986d2f97 Mon Sep 17 00:00:00 2001 From: Bakhtiyor Ganijon Date: Wed, 29 Nov 2023 09:25:34 +0900 Subject: [PATCH] Update tag layout and generate metadata --- app/(Main)/tags/[tagname]/layout.tsx | 13 ------------- app/(Main)/tags/layout.tsx | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/app/(Main)/tags/[tagname]/layout.tsx b/app/(Main)/tags/[tagname]/layout.tsx index cccda24..0618cda 100644 --- a/app/(Main)/tags/[tagname]/layout.tsx +++ b/app/(Main)/tags/[tagname]/layout.tsx @@ -62,19 +62,6 @@ export async function generateMetadata( } } -const tags = await postgres.tag.findMany({ - orderBy: { - posts: { - _count: 'desc' - } - } -}); -//add href to tags -tags.forEach((tag: any) => { - tag.href = `/tags/${tag.name}`; -} -) - export default async function TagLayout({ children, params }: Props) { return ( <> diff --git a/app/(Main)/tags/layout.tsx b/app/(Main)/tags/layout.tsx index 16331ff..9acfe5d 100644 --- a/app/(Main)/tags/layout.tsx +++ b/app/(Main)/tags/layout.tsx @@ -3,8 +3,8 @@ import { SiteFooter } from "@/components/footer"; import { Metadata } from "next" export const metadata: Metadata = { - title: 'Explore topics on FalseNotes', - description: 'Explore topics on FalseNotes', + title: 'Explore tags on FalseNotes', + description: 'Explore tags on FalseNotes', }