fix: Pragmatic fix to drafts count in sidebar, closes #7219

This commit is contained in:
Tom Moor
2024-09-21 13:51:46 -04:00
parent f0c26cf8c8
commit 34f951c511
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -116,7 +116,9 @@ function AppSidebar() {
{t("Drafts")}
{documents.totalDrafts > 0 ? (
<Drafts size="xsmall" type="tertiary">
{documents.totalDrafts}
{documents.totalDrafts > 25
? "25+"
: documents.totalDrafts}
</Drafts>
) : null}
</Flex>
+2 -2
View File
@@ -367,8 +367,8 @@ export default class DocumentsStore extends Store<Document> {
this.fetchNamedPage("starred", options);
@action
fetchDrafts = (options?: PaginationParams): Promise<Document[]> =>
this.fetchNamedPage("drafts", options);
fetchDrafts = (options: PaginationParams = {}): Promise<Document[]> =>
this.fetchNamedPage("drafts", { limit: 100, ...options });
@action
fetchOwned = (options?: PaginationParams): Promise<Document[]> =>