Skip to content

Commit ded2056

Browse files
committed
feature section
1 parent dd98cc0 commit ded2056

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/components/WatchDemo.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client"
22

33
import { useEffect, useState } from 'react'
4+
import Image from 'next/image'
45

56
export default function WatchDemo() {
67
const [open, setOpen] = useState(false)
@@ -49,7 +50,9 @@ export default function WatchDemo() {
4950
</button>
5051

5152
<div className="p-4">
52-
<img src="/assets/Gif/keynotes.gif" alt="Keynotes demo" className="w-full h-auto rounded" />
53+
<div className="relative w-full" style={{ aspectRatio: '16/9' }}>
54+
<Image src="/assets/Gif/keynotes.gif" alt="Keynotes demo" fill className="object-contain rounded" />
55+
</div>
5356
</div>
5457
</div>
5558
</div>

src/lib/realtime.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ export function broadcastNotesUpdated(payload: unknown = { type: 'notesUpdated',
3131
const chunk = formatSSE('notesUpdated', payload)
3232

3333
// Keep the debug lightweight to avoid spamming logs with full payloads
34-
console.debug('[realtime] broadcastNotesUpdated', { type: (payload && (payload as any).type) ?? 'notesUpdated', recipientsCount: recipients?.length ?? 0 })
34+
let _typeField = 'notesUpdated'
35+
if (payload && typeof payload === 'object' && 'type' in payload && typeof (payload as Record<string, unknown>).type === 'string') {
36+
_typeField = (payload as Record<string, unknown>).type as string
37+
}
38+
console.debug('[realtime] broadcastNotesUpdated', { type: _typeField, recipientsCount: recipients?.length ?? 0 })
3539

3640
if (!recipients || recipients.length === 0) {
3741
// broadcast to all

0 commit comments

Comments
 (0)