Skip to content

Commit 0c7bce3

Browse files
authored
fix: Update SaveTransientRequestModal empty state when collections don't exist (usebruno#7955)
1 parent 327861b commit 0c7bce3

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

  • packages/bruno-app/src/components/SaveTransientRequest

packages/bruno-app/src/components/SaveTransientRequest/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,18 @@ const SaveTransientRequest = ({ item: itemProp, collection: collectionProp, isOp
547547
</ul>
548548
) : (
549549
<div className="collection-empty-state">
550-
<p>No collections Yet</p>
550+
<p>No Collections Yet</p>
551551
<p className="collection-empty-state-subtitle">Collections help you organize your requests. Create your first one to save this request.</p>
552+
<Button
553+
type="button"
554+
color="primary"
555+
variant="outline"
556+
icon={<IconFolder size={16} strokeWidth={1.5} />}
557+
onClick={handleShowNewCollection}
558+
className="mt-4"
559+
>
560+
New collection
561+
</Button>
552562
</div>
553563
)}
554564
</div>
@@ -748,7 +758,7 @@ const SaveTransientRequest = ({ item: itemProp, collection: collectionProp, isOp
748758
New Folder
749759
</Button>
750760
)}
751-
{isSelectingCollection && !newCollection.show && (
761+
{isSelectingCollection && !newCollection.show && availableCollections.length > 0 && (
752762
<Button
753763
type="button"
754764
color="primary"

0 commit comments

Comments
 (0)