From 4a2dba6e2ec15c4bec47050d13a75ed45c7019c7 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Thu, 7 Aug 2025 23:28:10 +0200 Subject: [PATCH] Hide register buttons if logged in --- app/About/page.tsx | 15 +++++++++------ app/page.tsx | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/About/page.tsx b/app/About/page.tsx index 03485f6e..144f10f4 100644 --- a/app/About/page.tsx +++ b/app/About/page.tsx @@ -2,8 +2,11 @@ import Link from "next/link"; import {aColor} from "@/lib/client/constants"; +import {useSession} from "next-auth/react"; export default function About() { + const {data: session} = useSession(); + const userId = session?.user?.id return (
@@ -17,14 +20,14 @@ export default function About() {

To find your people with ease.

-
+ {!userId &&
Join Now -
+
}
@@ -53,14 +56,14 @@ export default function About() {
-
+ {!userId &&
Get Started -
+
}

Help Compass

@@ -125,14 +128,14 @@ export default function About() {

Thank you for supporting us!

-
+ {!userId &&
Join Compass -
+
} diff --git a/app/page.tsx b/app/page.tsx index e0c5aafc..919628b6 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -72,14 +72,14 @@ export default function HomePage() { {/*

*/} {/* Spacer */}
-
+ {!userId &&
Join Compass {/* Spacer */} {/*
*/} -
+
} {/* Why Compass Bar */}