Skip to content

[Improvement] Add an empty state to the "Recent Pools" dropdown when the list is empty #106

Description

@grantfox-oss

Getting Started

  1. Fork the repository: https://github.com/JointSave-org/Joint_Save
  2. Clone your fork:
   git clone https://github.com/<your-username>/Joint_Save.git
   cd Joint_Save
  1. Create a new branch:
   git checkout -b improve/recent-pools-empty-state

Overview

The "Recent Pools" dropdown in dashboard-header.tsx (powered by useRecentPools) maps over the recent pools list with no fallback for when the list is empty. A brand-new user, or anyone who hasn't visited any pool detail pages yet, would open the dropdown and just see the "Recent Pools" label and a separator with nothing underneath — confusing, since it looks broken rather than just empty.

The notification bell dropdown in the same file already handles this correctly with a "No notifications yet" message — this issue is about matching that pattern.

Current Code (around line 143)

<DropdownMenuLabel>Recent Pools</DropdownMenuLabel>
<DropdownMenuSeparator />
{recentPools.map((pool) => (
  ...
))}

Fix

<DropdownMenuLabel>Recent Pools</DropdownMenuLabel>
<DropdownMenuSeparator />
{recentPools.length === 0 ? (
  <div className="px-2 py-3 text-center text-sm text-muted-foreground">
    No recent pools yet
  </div>
) : (
  recentPools.map((pool) => (
    ...
  ))
)}

Acceptance Criteria

  • Opening the dropdown with zero recent pools shows a clear "No recent pools yet" message instead of an empty list
  • No change to behavior when recent pools exist

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions