feat: add link to home page from dashboard

This commit is contained in:
2026-01-12 22:09:25 +01:00
parent b3b1e0a75f
commit 88a594447b
3 changed files with 38 additions and 24 deletions

View File

@@ -1,7 +1,10 @@
import Image from "next/image"
import { notFound } from "next/navigation"
import { cookies } from "next/headers"
import Link from "next/link"
import { ChevronLeft } from "lucide-react"
import prisma from "@/lib/prisma"
import { Button } from "@/components/ui/button"
import { PlanLoginForm } from "@/components/plan-login-form"
import { PlanDashboard } from "./_components/plan-dashboard"
import { getDictionary } from "@/get-dictionary"
@@ -37,6 +40,14 @@ export default async function DashboardPage({
return (
<main className="flex min-h-screen flex-col items-center p-4">
<div className="w-full max-w-4xl space-y-6">
<div className="flex flex-col gap-4">
<Button variant="ghost" size="sm" asChild className="w-fit -ml-2 text-muted-foreground">
<Link href={`/${lang}`}>
<ChevronLeft className="w-4 h-4 mr-1" />
{dict.dashboard.backToHome}
</Link>
</Button>
<div className="flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
<div className="flex items-center gap-4">
<div className="bg-white p-1.5 rounded-xl shadow-sm border border-primary/10">
@@ -64,6 +75,7 @@ export default async function DashboardPage({
<PlanDashboard plan={plan} dict={dict.dashboard} settingsDict={dict.settings} lang={lang} />
</div>
</div>
</div>
</main>
)
}

View File

@@ -18,6 +18,7 @@
"passwordError": "Das Passwort muss mindestens 4 Zeichen lang sein."
},
"dashboard": {
"backToHome": "Zur Startseite",
"overview": "Übersicht",
"instructions": "Anleitungen",
"instructionsTitle": "Katzenpflege-Anleitungen",

View File

@@ -18,6 +18,7 @@
"passwordError": "Password must be at least 4 characters."
},
"dashboard": {
"backToHome": "Back to Home",
"overview": "Overview",
"instructions": "Instructions",
"instructionsTitle": "Cat Care Instructions",