From 0d888af1771d5007740b30f9272fd36098499f6a Mon Sep 17 00:00:00 2001 From: MOH Date: Wed, 11 Mar 2026 23:26:46 +0100 Subject: [PATCH] Remove experimental products section --- app/[locale]/(site)/products/[slug]/page.tsx | 148 ------------------- app/[locale]/(site)/products/page.tsx | 84 ----------- app/root/site-settings/actions.ts | 2 +- app/sitemap.ts | 11 -- components/layout/site-footer.tsx | 1 - lib/site-data.ts | 91 ------------ messages/ar.json | 16 -- messages/de.json | 16 -- messages/en.json | 16 -- 9 files changed, 1 insertion(+), 384 deletions(-) delete mode 100644 app/[locale]/(site)/products/[slug]/page.tsx delete mode 100644 app/[locale]/(site)/products/page.tsx delete mode 100644 lib/site-data.ts diff --git a/app/[locale]/(site)/products/[slug]/page.tsx b/app/[locale]/(site)/products/[slug]/page.tsx deleted file mode 100644 index 0e25253..0000000 --- a/app/[locale]/(site)/products/[slug]/page.tsx +++ /dev/null @@ -1,148 +0,0 @@ -import type { Metadata } from "next"; -import { ArrowLeft, BadgeEuro, Boxes, Layers2 } from "lucide-react"; -import Link from "next/link"; -import { getTranslations } from "next-intl/server"; -import { notFound } from "next/navigation"; - -import { Container } from "@/components/layout/container"; -import { PageHero } from "@/components/layout/page-hero"; -import { MotionFade } from "@/components/motion-fade"; -import { routing } from "@/i18n/routing"; -import { buildLocalizedMetadata } from "@/lib/metadata"; -import { getLocalizedPath, resolveLocale } from "@/lib/locale"; -import { getProductItem, pickText, productItems } from "@/lib/site-data"; -import { AppCard } from "@/components/ui/app-card"; -import { Button } from "@/components/ui/button"; -import { CardContent } from "@/components/ui/card"; - -type ProductPageProps = { - params: { - locale: string; - slug: string; - }; -}; - -export function generateStaticParams() { - return routing.locales.flatMap((locale) => - productItems.map((item) => ({ - locale, - slug: item.slug, - })), - ); -} - -export async function generateMetadata({ - params: { locale, slug }, -}: ProductPageProps): Promise { - const localeKey = resolveLocale(locale); - const item = getProductItem(slug); - - if (!item) { - return await buildLocalizedMetadata({ - locale: localeKey, - pathname: `/products/${slug}`, - title: "Products", - description: "Product page", - }); - } - - return await buildLocalizedMetadata({ - locale: localeKey, - pathname: `/products/${slug}`, - title: pickText(item.name, localeKey), - description: pickText(item.summary, localeKey), - }); -} - -export default async function ProductPage({ params: { locale, slug } }: ProductPageProps) { - const localeKey = resolveLocale(locale); - const item = getProductItem(slug); - - if (!item) { - notFound(); - } - - const t = await getTranslations({ locale: localeKey, namespace: "productDetail" }); - - return ( - <> - - - - - - - - -

- {pickText(item.name, localeKey)} -

-

- {pickText(item.summary, localeKey)} -

- -
- {[ - { - icon: Layers2, - label: pickText(item.segment, localeKey), - }, - { - icon: BadgeEuro, - label: pickText(item.price, localeKey), - }, - { - icon: Boxes, - label: item.slug, - }, - ].map((meta) => { - const Icon = meta.icon; - - return ( - - - - {meta.label} - - - ); - })} -
-
-
-
- - - - -

{t("included")}

-
    - {[t("stepOne"), t("stepTwo"), t("stepThree")].map((step, index) => ( - - - - {index + 1} - -

    {step}

    -
    -
    - ))} -
- -
-
-
-
- - ); -} diff --git a/app/[locale]/(site)/products/page.tsx b/app/[locale]/(site)/products/page.tsx deleted file mode 100644 index 03dafe5..0000000 --- a/app/[locale]/(site)/products/page.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import type { Metadata } from "next"; -import { ArrowUpRight, CircleDollarSign } from "lucide-react"; -import Link from "next/link"; -import { getTranslations } from "next-intl/server"; - -import { Container } from "@/components/layout/container"; -import { PageHero } from "@/components/layout/page-hero"; -import { MotionFade } from "@/components/motion-fade"; -import { buildLocalizedMetadata } from "@/lib/metadata"; -import { AppCard } from "@/components/ui/app-card"; -import { CardContent } from "@/components/ui/card"; -import { getLocalizedPath, resolveLocale } from "@/lib/locale"; -import { pickText, productItems } from "@/lib/site-data"; - -type ProductsPageProps = { - params: { - locale: string; - }; -}; - -export async function generateMetadata({ - params: { locale }, -}: ProductsPageProps): Promise { - const localeKey = resolveLocale(locale); - const t = await getTranslations({ locale: localeKey, namespace: "productsPage" }); - - return await buildLocalizedMetadata({ - locale: localeKey, - pathname: "/products", - title: t("title"), - description: t("intro"), - }); -} - -export default async function ProductsPage({ params: { locale } }: ProductsPageProps) { - const localeKey = resolveLocale(locale); - const t = await getTranslations({ locale: localeKey, namespace: "productsPage" }); - - return ( - <> - - - -
- {productItems.map((item, index) => ( - - - - -

- {pickText(item.segment, localeKey)} -

-

- {pickText(item.name, localeKey)} -

-

- {pickText(item.summary, localeKey)} -

-

- - {pickText(item.price, localeKey)} -

-

- {t("open")} - -

- -
-
-
- ))} -
-
- - ); -} diff --git a/app/root/site-settings/actions.ts b/app/root/site-settings/actions.ts index 39b3ea7..8d9154c 100644 --- a/app/root/site-settings/actions.ts +++ b/app/root/site-settings/actions.ts @@ -78,7 +78,7 @@ async function revalidateSiteSettingsPages() { revalidatePath("/root/site-settings"); revalidatePath("/coming-soon"); - const publicPaths = ["/", "/about", "/portfolio", "/products", "/contact", "/success", "/coming-soon"]; + const publicPaths = ["/", "/about", "/portfolio", "/contact", "/success", "/coming-soon"]; for (const locale of routing.locales) { revalidatePath(getLocalizedPath(locale), "layout"); diff --git a/app/sitemap.ts b/app/sitemap.ts index 9330612..e85e171 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -4,7 +4,6 @@ import { unstable_noStore as noStore } from "next/cache"; import { routing } from "@/i18n/routing"; import { getLocalizedPath } from "@/lib/locale"; import { getPublishedPortfolioProjects } from "@/lib/portfolio"; -import { productItems } from "@/lib/site-data"; function getSiteUrl(): URL { return new URL(process.env.NEXT_PUBLIC_SITE_URL ?? "https://mohfarawati.de"); @@ -60,20 +59,10 @@ export default async function sitemap(): Promise { priority: 0.8, }), ), - ...buildLocalizedEntries("/products", { - changeFrequency: "weekly", - priority: 0.8, - }), ...buildLocalizedEntries("/contact", { changeFrequency: "monthly", priority: 0.7, }), - ...productItems.flatMap((item) => - buildLocalizedEntries(`/products/${item.slug}`, { - changeFrequency: "monthly", - priority: 0.7, - }), - ), ...projects.flatMap((project) => buildLocalizedEntries(`/portfolio/${project.slug}`, { lastModified: project.publishedAt ?? undefined, diff --git a/components/layout/site-footer.tsx b/components/layout/site-footer.tsx index 94da9fa..7180ddb 100644 --- a/components/layout/site-footer.tsx +++ b/components/layout/site-footer.tsx @@ -7,7 +7,6 @@ import { getLocalizedPath } from "@/lib/locale"; const navItems = [ { key: "home", path: "" }, { key: "portfolio", path: "/portfolio" }, - { key: "products", path: "/products" }, { key: "about", path: "/about" }, { key: "contact", path: "/contact" }, ]; diff --git a/lib/site-data.ts b/lib/site-data.ts deleted file mode 100644 index 2c67a0e..0000000 --- a/lib/site-data.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { AppLocale } from "@/lib/locale"; - -type LocalizedText = Record; - -export type ProductItem = { - slug: string; - name: LocalizedText; - summary: LocalizedText; - segment: LocalizedText; - price: LocalizedText; -}; - -export const productItems: ProductItem[] = [ - { - slug: "starter-kit", - name: { - de: "Starter Kit", - en: "Starter Kit", - ar: "Starter Kit", - }, - summary: { - de: "Basis Paket fuer den schnellen Start von neuen Projekten.", - en: "Base package for launching new projects quickly.", - ar: "باقة أساسية لبدء المشاريع الجديدة بسرعة.", - }, - segment: { - de: "Small Teams", - en: "Small Teams", - ar: "الفرق الصغيرة", - }, - price: { - de: "ab 990 EUR", - en: "from 990 EUR", - ar: "ابتداءً من 990 EUR", - }, - }, - { - slug: "growth-kit", - name: { - de: "Growth Kit", - en: "Growth Kit", - ar: "Growth Kit", - }, - summary: { - de: "Skalierbares Paket fuer wachsende Produkte und Prozesse.", - en: "Scalable package for growing products and processes.", - ar: "باقة قابلة للتوسع للمنتجات والعمليات المتنامية.", - }, - segment: { - de: "Scaleups", - en: "Scaleups", - ar: "الشركات المتوسعة", - }, - price: { - de: "ab 2490 EUR", - en: "from 2490 EUR", - ar: "ابتداءً من 2490 EUR", - }, - }, - { - slug: "enterprise-kit", - name: { - de: "Enterprise Kit", - en: "Enterprise Kit", - ar: "Enterprise Kit", - }, - summary: { - de: "Massgeschneiderte Loesung fuer grosse Teams und komplexe Systeme.", - en: "Tailored solution for large teams and complex systems.", - ar: "حل مخصص للفرق الكبيرة والأنظمة المعقدة.", - }, - segment: { - de: "Enterprise", - en: "Enterprise", - ar: "المؤسسات", - }, - price: { - de: "auf Anfrage", - en: "on request", - ar: "عند الطلب", - }, - }, -]; - -export function pickText(text: LocalizedText, locale: AppLocale): string { - return text[locale]; -} - -export function getProductItem(slug: string) { - return productItems.find((item) => item.slug === slug); -} diff --git a/messages/ar.json b/messages/ar.json index a52d9c0..bc4220b 100644 --- a/messages/ar.json +++ b/messages/ar.json @@ -52,7 +52,6 @@ "serviceTracking": "تراكنغ واضح وفهم لحركة الزوار.", "serviceSystem": "سستم خاص لشركتك أو لفريقك.", "toPortfolio": "عرض الأعمال", - "toProducts": "عرض المنتجات", "toContact": "تواصل معي" }, "portfolioPage": { @@ -64,13 +63,6 @@ "all": "كل التصنيفات", "empty": "لا توجد مشاريع منشورة ضمن هذا التصنيف حالياً." }, - "productsPage": { - "title": "المنتجات", - "heroBadge": "حلول جاهزة", - "heroTitle": "منتجاتي", - "intro": "باقات للفرق من البداية حتى التوسع.", - "open": "فتح المنتج" - }, "aboutPage": { "title": "من أنا", "heroBadge": "خلّيني عرّفك عليّي", @@ -155,13 +147,5 @@ "openLink": "فتح الرابط", "gallery": "معرض المشروع", "download": "فتح الملف" - }, - "productDetail": { - "back": "العودة إلى المنتجات", - "included": "يشمل", - "stepOne": "جلسة انطلاق وتوضيح النطاق", - "stepTwo": "إعداد التصميم والمكونات", - "stepThree": "تنفيذ وتسليم", - "action": "تواصل لطلب عرض" } } diff --git a/messages/de.json b/messages/de.json index 5cb0615..46a6c2b 100644 --- a/messages/de.json +++ b/messages/de.json @@ -52,7 +52,6 @@ "serviceTracking": "Tracking und bessere Auswertung.", "serviceSystem": "Interne Systeme für Teams und Firmen.", "toPortfolio": "Portfolio ansehen", - "toProducts": "Produkte ansehen", "toContact": "Kontakt aufnehmen" }, "portfolioPage": { @@ -64,13 +63,6 @@ "all": "Alle Kategorien", "empty": "Für diesen Filter sind noch keine veröffentlichten Projekte vorhanden." }, - "productsPage": { - "title": "Produkte", - "heroBadge": "Pakete und Lösungen", - "heroTitle": "Klare Angebote", - "intro": "Pakete für Teams von Start bis Skalierung.", - "open": "Produkt öffnen" - }, "aboutPage": { "title": "Über mich", "heroBadge": "Mehr über mich", @@ -155,13 +147,5 @@ "openLink": "Link öffnen", "gallery": "Projektgalerie", "download": "Dokument öffnen" - }, - "productDetail": { - "back": "Zurück zu Produkten", - "included": "Inklusive", - "stepOne": "Kickoff und Scope Klarheit", - "stepTwo": "Setup von Design und Komponenten", - "stepThree": "Implementierung und Übergabe", - "action": "Kontakt für Angebot" } } diff --git a/messages/en.json b/messages/en.json index 500c27e..248c12e 100644 --- a/messages/en.json +++ b/messages/en.json @@ -52,7 +52,6 @@ "serviceTracking": "Tracking setup and user insights.", "serviceSystem": "Custom internal systems for teams.", "toPortfolio": "View portfolio", - "toProducts": "View products", "toContact": "Contact me" }, "portfolioPage": { @@ -64,13 +63,6 @@ "all": "All categories", "empty": "No published projects are available for this filter yet." }, - "productsPage": { - "title": "Products", - "heroBadge": "Packages and offers", - "heroTitle": "Clear offers", - "intro": "Packages for teams from early stage to scale.", - "open": "Open product" - }, "aboutPage": { "title": "About", "heroBadge": "A bit more about me", @@ -155,13 +147,5 @@ "openLink": "Open link", "gallery": "Project gallery", "download": "Open document" - }, - "productDetail": { - "back": "Back to products", - "included": "Included", - "stepOne": "Kickoff and scope clarity", - "stepTwo": "Design and component setup", - "stepThree": "Implementation and handover", - "action": "Contact for proposal" } }