Make landing page public and redirect auth users directly
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ const geistMono = Geist_Mono({
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(
|
||||
process.env.NEXT_PUBLIC_SITE_URL ?? "https://kita-planer.example.com",
|
||||
process.env.NEXT_PUBLIC_SITE_URL ?? "https://mein-kitaplaner.de",
|
||||
),
|
||||
title: {
|
||||
default: "Der digitale Kita-Planer für Elternvereine",
|
||||
|
||||
+4
-10
@@ -1,7 +1,6 @@
|
||||
import type { Metadata } from "next";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { redirect } from "next/navigation";
|
||||
import {
|
||||
ArrowRight,
|
||||
CheckCircle2,
|
||||
@@ -23,8 +22,6 @@ import {
|
||||
UsersRound,
|
||||
} from "lucide-react";
|
||||
|
||||
import { auth } from "@/auth";
|
||||
import { getPostLoginRedirect } from "@/lib/post-login-redirect";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
@@ -41,6 +38,9 @@ export const metadata: Metadata = {
|
||||
title: "Kita-Planer für Elterninitiativen und Kita-Vereine",
|
||||
description:
|
||||
"Die einfache Plattform für Elterninitiativen, freie Kitas und Kita-Vereine: organisiert Dienste, Termine, Krankmeldungen und offizielle Kommunikation an einem Ort.",
|
||||
alternates: {
|
||||
canonical: "/",
|
||||
},
|
||||
openGraph: {
|
||||
title: "Kita-Planer für Elterninitiativen und Kita-Vereine",
|
||||
description:
|
||||
@@ -172,13 +172,7 @@ const onboardingSteps = [
|
||||
},
|
||||
];
|
||||
|
||||
// Eingeloggte User von der Landingpage direkt weiterleiten.
|
||||
export default async function LandingPage() {
|
||||
const session = await auth();
|
||||
if (session?.user?.id) {
|
||||
redirect(getPostLoginRedirect(session.user));
|
||||
}
|
||||
|
||||
export default function LandingPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-[#f8faf8] text-slate-950">
|
||||
<header className="absolute left-0 right-0 top-0 z-20">
|
||||
|
||||
Reference in New Issue
Block a user