perf: hoist empty Set default to prevent card re-renders

This commit is contained in:
ved015 2026-04-16 23:07:35 +05:30
parent b8e5376b99
commit 3f36d6c9b0

View file

@ -120,6 +120,7 @@ function fetchOgData(url: string): Promise<OgData | null> {
const PAGE_SIZE = 100
const MAX_TOTAL = 1000
const EMPTY_SET = new Set<string>()
const MEMORIES_LOADING_LABELS = [
"Getting your supermemories…",
@ -214,7 +215,7 @@ export function MemoriesGrid({
isChatOpen,
onOpenDocument,
isSelectionMode = false,
selectedDocumentIds = new Set(),
selectedDocumentIds = EMPTY_SET,
onEnterSelectionMode,
onToggleSelection,
onClearSelection,