diff --git a/apps/portfolio/app/preview/[documentId]/page.tsx b/apps/portfolio/app/preview/[documentId]/page.tsx index 9176a2b5..127bd7a3 100644 --- a/apps/portfolio/app/preview/[documentId]/page.tsx +++ b/apps/portfolio/app/preview/[documentId]/page.tsx @@ -35,7 +35,7 @@ export async function generateMetadata({ // Fail silently } return { - title: "Private Portfolio Preview | VeriWorkly", + title: "Private Portfolio Preview", robots: { index: false, follow: false }, }; } diff --git a/apps/portfolio/app/templates/[id]/preview/page.tsx b/apps/portfolio/app/templates/[id]/preview/page.tsx index c9c9ec2d..8a2b474a 100644 --- a/apps/portfolio/app/templates/[id]/preview/page.tsx +++ b/apps/portfolio/app/templates/[id]/preview/page.tsx @@ -1,6 +1,8 @@ -import { notFound } from "next/navigation"; import type { Metadata } from "next"; +import { notFound } from "next/navigation"; + import { DraftPreview } from "@/components/DraftPreview"; + import { isTemplateId, templates } from "@/templates/catalog/templates"; export async function generateMetadata({ @@ -9,16 +11,16 @@ export async function generateMetadata({ params: Promise<{ id: string }>; }): Promise { const { id } = await params; + const template = templates.find((t) => t.id === id); - if (!template) { + if (!template) return { - title: "Template Preview | VeriWorkly", + title: "Template Preview", robots: { index: true, follow: true }, }; - } - const title = `${template.name} Template Live Preview | VeriWorkly`; + const title = `${template.name} Template Live Preview`; const description = `See a live interactive preview of the ${template.name} template. Switch styles, layouts, and visualize your portfolio.`; const imageUrl = `/og/templates/preview/${template.id}-preview-page-og.png`; @@ -59,6 +61,8 @@ export async function generateMetadata({ export default async function Preview({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; + if (!isTemplateId(id)) notFound(); + return ; } diff --git a/apps/portfolio/components/PortfolioPublicFooter.tsx b/apps/portfolio/components/PortfolioPublicFooter.tsx index 5a7b7d48..e29f31c0 100644 --- a/apps/portfolio/components/PortfolioPublicFooter.tsx +++ b/apps/portfolio/components/PortfolioPublicFooter.tsx @@ -32,7 +32,7 @@ const products = [ const PortfolioPublicFooter = () => { return ( -