import Link from "next/link"; import { getServerSession } from "next-auth"; import { authOptions } from "@/lib/auth"; import { profileRepo } from "@/server/repositories/profile.repo"; /** * Server component banner: muncul di atas semua halaman ketika user sudah login * tapi profil sosialnya kosong. Menjaga janji "kenalan dulu, gabung kemudian" * dengan mendorong user mengisi minat/kota sebelum join trip. */ export async function ProfileNudgeBanner() { const session = await getServerSession(authOptions); if (!session?.user?.id) return null; const profile = await profileRepo.findByUserId(session.user.id); const hasMeaningfulProfile = !!profile && (!!profile.bio?.trim() || !!profile.city?.trim() || profile.interests.length > 0); if (hasMeaningfulProfile) return null; return (

Lengkapi profil sosial kamu — bio, kota, dan minat. Calon teman trip akan lebih mudah kenal kamu sebelum gabung bareng.

Isi profil sekarang
); }