From 3523287dff6b52b0718d0021fdffaa0bf8f1ecf5 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Sun, 18 Jan 2026 16:02:35 +0100 Subject: [PATCH] [dyad] Fixing dynamic page titles - wrote 5 file(s) --- src/app/changelog/page.tsx | 5 +++++ src/app/imprint/page.tsx | 5 +++++ src/app/layout.tsx | 1 - src/app/privacy/page.tsx | 5 +++++ src/components/home-page.tsx | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/app/changelog/page.tsx b/src/app/changelog/page.tsx index 27f67c8..fef955d 100644 --- a/src/app/changelog/page.tsx +++ b/src/app/changelog/page.tsx @@ -5,10 +5,15 @@ import Link from "next/link"; import { Button } from "@/components/ui/button"; import { ArrowLeft } from "lucide-react"; import { useTranslation } from "@/context/i18n-context"; +import { useEffect } from "react"; export default function ChangelogPage() { const { t } = useTranslation(); + useEffect(() => { + document.title = t('changelogPage.title'); + }, [t]); + return (
diff --git a/src/app/imprint/page.tsx b/src/app/imprint/page.tsx index 44b4da3..ec4737d 100644 --- a/src/app/imprint/page.tsx +++ b/src/app/imprint/page.tsx @@ -5,10 +5,15 @@ import { Button } from "@/components/ui/button"; import { ArrowLeft } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { useTranslation } from "@/context/i18n-context"; +import { useEffect } from "react"; export default function ImprintPage() { const { t } = useTranslation(); + useEffect(() => { + document.title = t('imprintPage.title'); + }, [t]); + return (
diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 4a11061..2cbb3c9 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,7 +17,6 @@ const geistMono = Geist_Mono({ }); export const metadata: Metadata = { - title: "Image Web Exporter", description: "Upload a picture, then export it in a different resolution and format.", }; diff --git a/src/app/privacy/page.tsx b/src/app/privacy/page.tsx index 7018176..595b3de 100644 --- a/src/app/privacy/page.tsx +++ b/src/app/privacy/page.tsx @@ -5,10 +5,15 @@ import { Button } from "@/components/ui/button"; import { ArrowLeft } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { useTranslation } from "@/context/i18n-context"; +import { useEffect } from "react"; export default function PrivacyPage() { const { t } = useTranslation(); + useEffect(() => { + document.title = t('privacyPage.title'); + }, [t]); + return (
diff --git a/src/components/home-page.tsx b/src/components/home-page.tsx index 0985d2e..63e97ea 100644 --- a/src/components/home-page.tsx +++ b/src/components/home-page.tsx @@ -2,10 +2,15 @@ import { ImageConverter } from "@/components/image-converter"; import { useTranslation } from "@/context/i18n-context"; +import { useEffect } from "react"; export function HomePage() { const { t } = useTranslation(); + useEffect(() => { + document.title = t('appTitle'); + }, [t]); + return (