Skip to Content
HomeLink Hub
MobileTenant

Search and Filters

How tenants search listings by title on the mobile app, and the current state of the filter screen.

Search is a single screen that queries the backend as the user types and shows results in a grid or list. The filter screen exists and is fully drawn, but its choices are not yet applied to any request.

Where it lives

ScreenRouteFileWho sees it
Search/searchapp/search.tsxTenants, from the home search bar or the home filter button
Filter/filterapp/filter.tsxTenants, from the tune icon on the search screen

Supporting code: services/property/property-thunk.ts (searchProperties endpoint on the propertyApi slice), interface/property.types.ts (PropertySearchQuery), components/app/property-card.tsx, components/app/property-grid-card.tsx, utils/format-price.ts.

Before you start

  • Signed in as a tenant (the entry points are on the tenant home screen).
  • No KYC and no device permissions are required.
  • GET /api/v1/property/search is public on the backend. It returns only properties that are listed and verified.

Flow

  1. From the home screen, tap the search bar or the filter button. Both push /search.
  2. The input (placeholder Search properties...) is focused automatically and the keyboard opens. Before anything is typed the screen shows the Search for Properties prompt.
  3. Typing is debounced by 350 ms. The text is trimmed; an empty or whitespace-only value sends nothing.
  4. Once the debounced text is non-empty the app fires GET /api/v1/property/search?title=TEXT&page=1&limit=20. The response is stored in the propertyApi RTK Query cache, keyed by the query arguments, so retyping a recent term is served from cache.
  5. While the request runs the heading reads Searching... with a spinner below it. When it finishes the heading reads N Properties Found (1 Property Found for a single result).
  6. Results render as grid cards (two columns, the default) or list cards. The icon next to the heading toggles the view.
  7. Tapping a card pushes /property/[id] with id set to the property _id. See Property details.
  8. The x icon inside the input clears the text and returns to the prompt. The back chevron leaves the screen.

Field rules:

FieldRule
Search textFree text, trimmed, no minimum length; one character is enough to search
Page sizeFixed at 20; there is no pagination or infinite scroll, so only the first 20 matches are shown

What the backend matches: the title parameter is applied as a case-insensitive substring match on the property title only. Results are sorted newest first because no sort is sent.

Search matches titles only

The prompt says Enter a location, property name, or type to start exploring. but the request only sends title. Typing a city, state or property type finds a listing only if that word is in its title.

Card content is mapped the same way as on the category screen: image from media.images[0].url (stock placeholder if missing), title (Untitled property if missing), community, state, rating, and price formatted like ₦1,500,000. The price period is night for short lets, year when a rent price exists, and omitted for a sale price on grid cards.

Controls that are not wired yet

Unfinished controls on the search screen

The chip row under the search bar (Price, Property Type, Beds, Baths, Year) and the Sort by button have no press handlers. They render but do nothing. Hearts on result cards are also not interactive on this screen.

Filter

  1. On the search screen tap the tune icon to push /filter.
  2. The header shows a back chevron, the title Filter and a Reset link.
  3. Sections and their options:
SectionControlOptionsDefault
Price RangeTwo-thumb slider, 0 to 1,000,000 in steps of 5,000, with a floating label and Min Price / Max Price boxesAny range₦50,000 - ₦500,000
Property TypeSingle-select chipsHouse, Apartment, Villa, Land, Commercial, Shortlet, OfficeHouse
BedroomsSingle-select chipsAny, 1, 2, 3, 4Any
BathroomsSingle-select chipsAny, 1, 2, 3, 4Any
AmenitiesMulti-select chipsWiFi, Security, AI Voice, WardrobeWiFi selected
  1. Reset restores the defaults above, except that it clears all amenities instead of re-selecting WiFi.
  2. Apply Filters calls router.back() and returns to the search screen.

Filters are not applied

The filter screen keeps its values in local component state only. Apply Filters just goes back: nothing is passed to the search screen, no request is made, and the values are lost when the screen closes. The backend search endpoint already accepts type, minPrice, maxPrice, bedrooms, bathrooms, state, address and sort, and the app type PropertySearchQuery declares them, but the search screen only ever sends title, page and limit.

States and edge cases

  • Nothing typed: Search for Properties with Enter a location, property name, or type to start exploring.
  • Typing: the results panel stays up between keystrokes so the prompt does not flash back.
  • Loading: heading Searching... and a large spinner. No skeleton cards.
  • No matches: No Results Found with Nothing matched that search. Try a different term or area.
  • Request failed or offline: a wifi-off icon, Couldn't load results and Check your connection and try again. There is no retry button; change the text to trigger a new request.
  • Sold or rented listings would show a status overlay on the card, but the search endpoint only returns listed properties, so this is not expected in search results.
  • An expired access token is refreshed silently once; if that fails the user is sent to sign-in. See Sign up and sign in.

What happens next

  • Search has no side effects on the backend. No search history or saved search is stored; Saved Searches on the profile screen is marked Coming soon.
  • Opening a result continues in Property details.
  • The propertyApi cache holding search results is cleared when the store resets on sign-out or session expiry.

On this page