diff --git a/src/components/HighlightItem.tsx b/src/components/HighlightItem.tsx index 093efb47..e4bce626 100644 --- a/src/components/HighlightItem.tsx +++ b/src/components/HighlightItem.tsx @@ -33,6 +33,13 @@ export const HighlightItem: React.FC = ({ highlight, onSelec return `${highlight.pubkey.slice(0, 8)}...` // fallback to short pubkey } + // Update offline indicator when highlight prop changes + useEffect(() => { + if (highlight.isOfflineCreated && !isSyncing) { + setShowOfflineIndicator(true) + } + }, [highlight.isOfflineCreated, isSyncing]) + // Listen to sync state changes useEffect(() => { const unsubscribe = onSyncStateChange((eventId, syncingState) => { diff --git a/src/hooks/useHighlightCreation.ts b/src/hooks/useHighlightCreation.ts index c468b08b..b93cfde2 100644 --- a/src/hooks/useHighlightCreation.ts +++ b/src/hooks/useHighlightCreation.ts @@ -73,6 +73,7 @@ export const useHighlightCreation = ({ console.log('✅ Highlight created successfully!', { id: newHighlight.id, isLocalOnly: newHighlight.isLocalOnly, + isOfflineCreated: newHighlight.isOfflineCreated, publishedRelays: newHighlight.publishedRelays })