diff --git a/src/app/people/page.tsx b/src/app/people/page.tsx
index f4575b5..6ccbad5 100644
--- a/src/app/people/page.tsx
+++ b/src/app/people/page.tsx
@@ -230,7 +230,7 @@ async function PeopleResults({
params.role
);
- const [{ profiles, error }, myProfile] = demoMode
+ const [{ profiles: found, error }, myProfile] = demoMode
? ([
{
profiles: filterDemoProfiles(
@@ -250,6 +250,9 @@ async function PeopleResults({
getProfile(user.id),
]);
+ // You're searching for other people, so leave yourself out.
+ const profiles = found.filter((p) => p.id !== user.id);
+
return (
{!demoMode && !myProfile && (
@@ -326,10 +329,7 @@ async function PeopleResults({
key={p.id}
className="min-w-0"
>
-
+
))}
diff --git a/src/app/people/profile-card.tsx b/src/app/people/profile-card.tsx
index 736d2a3..1fec6cc 100644
--- a/src/app/people/profile-card.tsx
+++ b/src/app/people/profile-card.tsx
@@ -1,18 +1,6 @@
import type { DirectoryProfile } from "./demo-profiles";
import { ProfileDetailModal } from "./profile-detail-modal";
-export function ProfileCard({
- profile,
- isMe,
-}: {
- profile: DirectoryProfile;
- isMe: boolean;
-}) {
- return (
-
- );
+export function ProfileCard({ profile }: { profile: DirectoryProfile }) {
+ return
;
}
\ No newline at end of file
diff --git a/src/app/people/profile-detail-modal.tsx b/src/app/people/profile-detail-modal.tsx
index 3df1c12..3de9b49 100644
--- a/src/app/people/profile-detail-modal.tsx
+++ b/src/app/people/profile-detail-modal.tsx
@@ -88,11 +88,9 @@ function ContactRow({
export function ProfileDetailModal({
profile: p,
- isMe,
card = false,
}: {
profile: DirectoryProfile;
- isMe: boolean;
card?: boolean;
}) {
const dialogRef = useRef
(null);
@@ -144,7 +142,11 @@ export function ProfileDetailModal({
{p.name}
- {isMe ? " (You)" : ""}
+
+
+ {/* Email tells apart people who share a name. */}
+
+ {p.email}
diff --git a/src/lib/auth.ts b/src/lib/auth.ts
index e736f6c..76b2424 100644
--- a/src/lib/auth.ts
+++ b/src/lib/auth.ts
@@ -1,6 +1,7 @@
import "server-only";
import { cache } from "react";
import { notFound, redirect } from "next/navigation";
+import { connection } from "next/server";
import { isOrganizer } from "@/lib/data";
import { createClient } from "@/lib/supabase/server";
import { isSupabaseConfigured } from "@/lib/supabase/env";
@@ -10,6 +11,8 @@ export type CurrentUser = { id: string; email: string };
/** The signed-in user, verified from the session JWT. Deduped per request. */
export const getCurrentUser = cache(async (): Promise => {
if (!isSupabaseConfigured) return null;
+ // The auth client reads the clock, so opt out of prerendering before touching it.
+ await connection();
const supabase = await createClient();
const { data } = await supabase.auth.getClaims();