()
+ for (const t of [...recentTopics.topics, ...popularTopics.topics]) {
+ if (t.isPinned && !pinnedMap.has(t.uri)) {
+ pinnedMap.set(t.uri, t)
+ }
+ }
+ const pinnedTopics = [...pinnedMap.values()]
+ const recentFiltered = recentTopics.topics.filter((t) => !t.isPinned)
+ const popularFiltered = popularTopics.topics.filter((t) => !t.isPinned)
- {/* Popular Topics */}
- {popularTopics.topics.length > 0 && (
-
-
-
- )}
+ return (
+ <>
+ {pinnedTopics.length > 0 && (
+
+ )}
+
+ {/* Recent Topics */}
+ {recentFiltered.length > 0 && (
+ 0 ? 'mt-8' : undefined}>
+
+
+ )}
+
+ {/* Popular Topics */}
+ {popularFiltered.length > 0 && (
+
+
+
+ )}
+ >
+ )
+ })()}
>
)}