feat: [US-046] - Presence indicators for active collaborators
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
7278b7527f
commit
f92fc1ad01
@@ -20,6 +20,15 @@ export default async function EditorPage({ params }: PageProps) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Fetch user's display name for presence
|
||||
const { data: profile } = await supabase
|
||||
.from('profiles')
|
||||
.select('display_name')
|
||||
.eq('id', user.id)
|
||||
.single()
|
||||
|
||||
const userDisplayName = profile?.display_name || user.email || 'Anonymous'
|
||||
|
||||
// Try to load as owner first
|
||||
const { data: ownedProject } = await supabase
|
||||
.from('projects')
|
||||
@@ -102,6 +111,7 @@ export default async function EditorPage({ params }: PageProps) {
|
||||
<FlowchartEditor
|
||||
projectId={project.id}
|
||||
userId={user.id}
|
||||
userDisplayName={userDisplayName}
|
||||
isOwner={isOwner}
|
||||
initialData={flowchartData}
|
||||
needsMigration={needsMigration}
|
||||
|
||||
Reference in New Issue
Block a user