Skip to content

UX: Add a "Recent Searches" history using LocalStorage #73

@DamienSable

Description

@DamienSable

📝 Description

Users often want to quickly check their own stats or jump between a few friends' profiles. Instead of forcing them to re-type the username every time, we should save their successful searches locally.

🎯 What needs to be done

When a user successfully generates a dashboard, save that username to an array in the browser's localStorage. On the homepage, if localStorage has recent searches, display them as small, clickable "chips" or a dropdown below the main input field.

📍 Where to look

  • app/components/HeroSection.tsx (Where the search input is located).
  • You may need to create a custom React hook (e.g., useLocalStorage) to handle hydration safely in Next.js without throwing hydration mismatch errors.

✅ Acceptance Criteria

  • Up to 5 recent unique usernames are saved in localStorage.
  • The UI displays these recent searches nicely below the main input box.
  • Clicking a recent search chip immediately triggers the routing to that user's dashboard.
  • Add a small "Clear History" button to wipe the localStorage state.

Metadata

Metadata

Assignees

Labels

GSSoC 2026backendServer-side logic, API routes, data fetching, and core application functionalityenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions