Fix Join Us button linking logged-in users to register page

Send logged-in users to their dashboard instead of the registration
form, matching how the Navbar already treats logged-in vs guest users.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-07 01:52:35 +02:00
co-authored by Claude Sonnet 5
parent 4bcb07f9d1
commit 56e0c8a31f
3 changed files with 30 additions and 5 deletions
+3 -5
View File
@@ -1,8 +1,9 @@
import { EventCard } from "@/components/events/EventCard";
import { Navbar } from "@/components/layout/Navbar";
import { Footer } from "@/components/layout/Footer";
import { JoinUsButton } from "@/components/home/JoinUsButton";
import { appName } from "@/lib/siteConfig";
import { Calendar, UserPlus, ArrowRight, CalendarCheck, Users, Heart, ShieldCheck } from "lucide-react";
import { Calendar, ArrowRight, CalendarCheck, Users, Heart, ShieldCheck } from "lucide-react";
type Event = {
id: string;
@@ -58,10 +59,7 @@ export default async function HomePage() {
<Calendar className="w-4 h-4" />
View Events
</a>
<a href="/register" className="inline-flex items-center gap-2 px-6 py-2.5 border border-brand-600 text-brand-600 rounded-xl hover:bg-brand-50 font-medium transition-colors">
<UserPlus className="w-4 h-4" />
Join Us
</a>
<JoinUsButton />
</div>
</div>
</section>