+ {workspaces.length > 0 ? (
+
+
+ Projects
+
+
+ {workspaces.map((project) => (
+
+ setFilterProjectId((current) => (current === project.id ? null : project.id))
+ }
+ onNewThread={() => openDraft(project.id)}
+ newThreadLabel={t`New thread in ${project.name}`}
+ />
+ ))}
+
+
+ ) : null}
+
+ {recentThreads.length > 0 || activeFilter !== null ? (
+
+
+ Recent threads
+
+ {recentThreads.length > 0 ? (
+
+ {recentThreads.map((thread) => {
+ const project = isHomeProjectId(thread.projectId)
+ ? homeProject
+ : projects.find((p) => p.id === thread.projectId);
+ return (
- ))}
-
-
- ) : null}
-
- {recentThreads.length > 0 ? (
-
-
- Recent threads
-
-
- {recentThreads.map((thread) => {
- const project = isHomeProjectId(thread.projectId)
- ? homeProject
- : projects.find((p) => p.id === thread.projectId);
- return (
-
- );
- })}
-
-
- ) : null}
-