Page MenuHomePhabricator

{PULA} Display “No data found” message for empty search results
Closed, ResolvedPublic

Description

Domain:
Frontend / UX

Difficulty:
Intermediate

Problem / steps to reproduce (for bugs)

  • When a user performs a search on the search bar and the API returns an empty array, the results page currently shows nothing.
  • This creates confusion because users cannot tell if:
    • The request failed
    • The API is still loading
    • Or simply no matching data was found

Expected outcome / task:

  • When a search returns an empty array:
    • Display a clear, visible message such as “No data found”
  • The message should appear in the results section where data would normally load.
  • Use Tailwind CSS to ensure the message is centered, readable, and consistent with the app’s overall style.
  • Ensure this message is only shown when:
    • API call completed successfully
    • Data array length is 0
  • Do *not* hide this message when loading or when errors occur (those states should be handled separately).

Any links or references:

Screenshot 2025-12-12 at 03.32.30.png (1,320×253 px, 18 KB)

Setup Steps (short):

  1. Run the project (yarn install && yarn dev).
  2. Go to the search results page component.
  3. After fetching search results, check: `js if (data.length === 0) { /* show message */ }

Event Timeline

3ch310n renamed this task from Display “No data found” message for empty search results to {PULA} Display “No data found” message for empty search results.Dec 12 2025, 7:06 PM
Udehb moved this task from Hacking projects to Completed on the WMA-HackChallenge-2025 board.