Manage Listings
The Listings tab, the Manage Property screen and the owner listing page, with every action an agent or landlord can take on an existing listing.
Where it lives
| Screen route | File | Who sees it |
|---|---|---|
/(tabs)/listings | app/(tabs)/listings.tsx | Agents and landlords (the tab is hidden for lawyers) |
/property/manage-property?id=... | app/property/manage-property.tsx | The listing's owner, from Manage on a card |
/property/my-listing/[id] | app/property/my-listing/[id].tsx | The listing's owner, from the card photo or title |
Supporting code:
| Concern | File |
|---|---|
Listing card (the listing variant) | components/app/property-card.tsx |
| Share sheet and share links | components/app/property-share-sheet.tsx, lib/share.ts |
| API calls | services/listings/listings-api.ts |
| Edit hand-off to the wizard | services/listings/listing-ui-slice.ts |
Before you start
- Role: agent or landlord inside the
(tabs)navigator. - No device permissions are needed on these screens.
- Creating a listing does not start here. The Listings tab has no add button; new listings start from the plus button on the dashboard home. See Create a listing.
Flow
Browse the Listings tab
- The screen is titled My Listings. On open it fires
GET /api/v1/property/mewithpage=1,limit=50andsort=newest. The result is cached by RTK Query under theMyListingstag, which create, update, delete and image changes all invalidate. - Search. The box (placeholder "Search by title, street or area") is debounced by 350 ms and sent as the
searchparameter. The server matches it against title, street, community and nearest landmark. A clear icon empties it. - Status tabs. All Listings, Active and Pending, each with a count in brackets. These filter the already loaded cards on the device; they do not send a status to the server.
- Cards. Each card shows the cover photo, a status badge, title, location (community, LGA, state), price, Views and Leads counts, and a Manage button. Views are unique views and leads are open inspection requests; both come from
GET /api/v1/property/me. - Tapping the photo or the title opens
/property/my-listing/[id]. Tapping Manage opens/property/manage-propertywith the listing id. - Pulling down refetches the list.
Status badges on the card, mapped from the listing's status:
| API status | Badge | Colour | Counted under |
|---|---|---|---|
listed | ACTIVE | Green | All Listings, Active |
pending_verification | PENDING | Orange | All Listings, Pending |
unlisted | UNLISTED | Grey | All Listings |
rented | RENTED | Purple | All Listings |
sold | SOLD | Red | All Listings |
The price suffix is /night for a short let and /year otherwise.
Filter and sort
The filter button next to the search box opens the Filters sheet. A badge on the button counts the active filters.
| Control | Sent as | Notes |
|---|---|---|
| Property type chips (Apartment, House, Villa, Land, Commercial, Shortlet, Office) | type | One at a time; tap again to clear |
| State | state | Free text, placeholder "e.g. Lagos". The server compares it exactly with the stored state |
| Price range (₦) Min and Max | minPrice, maxPrice | Digits only |
| Sort by | sort | Newest first (newest), Price: low to high (price_asc), Price: high to low (price_desc) |
Edits are held in the sheet until Apply. Closing the sheet discards them. Clear all resets every filter and closes the sheet. Each change of search or filters refires GET /api/v1/property/me with the new parameters.
Manage Property
The screen loads the listing with GET /api/v1/property/:id and shows, top to bottom:
- Header Manage Property with a back chevron.
- Cover photo, status badge, title and location. Badge labels here are Active (
listed), Pending (pending_verification), Unlisted, Rented and Sold. - Three stat tiles: Total Views, Inquiries and Conversion Rate.
- Performance History ("Last 7 days"): a bar chart of views per weekday, MON to SUN, built from the
viewsentries on the listing. The busiest day is highlighted and the heading shows the total, for example "12 views". - Visibility row with a switch and the caption "Currently public" or "Currently hidden". The switch is on when the status is
listed. - Edit and Delete buttons.
Placeholder numbers
The three stat tiles are hardcoded (2,840 with +12%, 224 with -12%, 4.3% with +0.5%) and are the same for every listing. Only the weekday chart uses real data. The three-dot button in the header and the Weekly pill on the chart do nothing.
Edit. Dispatches setListingFormMode("edit") and setSelectedPropertyId(id) to the listingUi slice, then pushes /property/create-edit-listing. After a successful update the wizard returns here and the screen refetches.
Delete.
- A confirmation alert titled Delete Property asks "Are you sure you want to delete this listing? This action cannot be undone." with Cancel and Delete.
- Delete fires
DELETE /api/v1/property/:id. The button shows a spinner meanwhile. - On success the app goes back to the previous screen and the list refetches. On failure: alert Error, "Failed to delete property. Please try again."
On the server this is a soft delete: the record is stamped with deletedAt and set to unlisted, so it drops out of every list while bookings, transactions and reviews that reference it survive.
Visibility switch. Turning it off sends PATCH /api/v1/property/:id with status: "unlisted"; turning it on sends status: "listed". The switch is disabled while the request runs. On failure: alert Error, "Failed to update visibility. Please try again."
Visibility and Activate / Deactivate do not match the backend
The backend's validation for PATCH /api/v1/property/:id accepts only title, description, pricing, availability, features and amenities, and the service never writes status. As the code stands, a request carrying status is rejected with a 400, so the Visibility switch here and the Activate / Deactivate button on the owner listing page end in their error alert and the status does not change. Treat hiding and re-listing from the mobile app as not working until the API accepts status.
Owner listing page
/property/my-listing/[id] is the owner's read view of one listing. It also loads GET /api/v1/property/:id.
- Header. Back chevron, the listing title, a share button and a three-dot button (no action).
- Cover photo, then the status badge (same labels as Manage Property) and
PROP ID -followed by the last eight characters of the listing id in upper case. - Title block. Title, location, price, bed and bath counts (hidden for categories without them) and area. A Verified badge appears when
verification.isVerifiedis true. A rent listing with more than one year up front shows "Agent collects 2 years up front" (or 3) under the price. - Description and Amenities, each shown only when present.
- Location map with the pin at the listing's coordinates. In Expo Go a static placeholder is shown instead of the Google map.
- Optimization Score and Key Suggestions.
- Edit Listing Details: same hand-off to the wizard as Edit on Manage Property.
- Deactivate (when
listed) or Activate (any other status): sendsPATCH /api/v1/property/:idwith the opposite status. On failure: alert Error, "Failed to update listing status. Please try again." See the callout above. - Delete: identical to Manage Property.
Placeholder content
The Optimization Score is a fixed 80% and the three Key Suggestions rows ("Add more high-quality photos", "Adjust price to market trends", "Refine property description") are static text with no action behind them.
Share a listing
The share button opens the Share property sheet.
- A preview card shows the photo, title, location and price.
- If the listing is
unlistedorpending_verification, a notice reads "This listing isn't active yet, so tenants won't find it in search. Anyone you send the link to can still open it." - The public link has the form
https://www.homelinkhub.org/app/property/:id. Copy puts it on the clipboard and reads Copied for two seconds. On a build without the clipboard module it opens the system share sheet instead. - Share via: WhatsApp, Telegram, X, Facebook and Email open the matching web share link with the text "Check out this property on HomeLink Hub:" followed by the title and location. More opens the system share sheet.
- If a target cannot be opened, the system share sheet is offered. If that also fails: alert Couldn't share, "Please try again in a moment."
No API request is made when sharing.
States and edge cases
- Loading the list. A spinner with "Loading your listings...". There are no skeleton cards.
- List error. "Could not load listings", "Pull to refresh or try again now." and a Try again button.
- Empty list. Title "No Listings Found" with one of: "You have not created any listings yet." (All Listings), "No active listings available right now." or "No pending listings available right now." (other tabs), or "Nothing matched your search or filters." with a Clear search and filters button when a search or filter is applied.
- No pagination. Only the first 50 listings are requested and there is no load-more. An account with more than 50 listings sees the 50 that sort first, and the tab counts reflect only those.
- Missing cover photo. The card and Manage Property fall back to stock images.
- Missing price. The card shows "Price on request".
- Sale listings show a period. The card and the owner page pass no period for a sale price, but both components default it to "year", so a sale listing still reads
/year. The share sheet shows no period for a sale. - Draft listings from the web. The mobile status type has no
draftvalue. A draft created on the web would be drawn as ACTIVE on the card and as Unlisted on the two detail screens. - Listings where the user is the agent, not the landlord.
GET /api/v1/property/mereturns listings where the user is eitherlandlordIdoragentId, but update, image and delete requests are allowed only for thelandlordId, so those actions fail with a permission error for agent-linked listings. - Detail load. Both detail screens show the full-screen loader, then on error "Failed to load property. Please go back and try again." with a Go Back button.
- No views yet. The chart area shows "No views yet" and "Once people start viewing this listing, their activity shows up here."
- Escrow. Neither screen shows escrow transactions or payment actions (mark payment, OTP release, completion). None of that lives in listing management.
What happens next
- Deleting a listing removes it from the owner's list and from public search straight away.
- Editing returns to Manage Property with fresh data; it does not change the listing's status or send it back through verification.
- A listing moves from Pending to Active on its own once legal review verifies it. Pull to refresh on the Listings tab to see the new badge.
HomeLink Hub