Skip to content

[Frontend] Build Carrier Marketplace Page #579

@mftee

Description

@mftee

Description:
Build the marketplace page where carriers can browse all pending (available) shipments. Includes search by origin/destination and pagination.

Create frontend/app/(dashboard)/marketplace/page.tsx.

Acceptance Criteria:

  • 'use client' directive
  • Fetches shipmentApi.marketplace(params) on mount and on search submit
  • Search bar: origin and destination text inputs + "Search" submit button + "Clear" button (visible when filters active)
  • Search is form-submit triggered (not live/debounced)
  • Shows loading skeleton (6 cards, 3-column grid) while fetching
  • Empty state: "No available shipments right now. Check back soon!"
  • Results in a 3-column grid on lg+, 2 on sm+, 1 on mobile using <ShipmentCard>
  • Pagination controls (Previous / Page X of Y / Next) shown when totalPages > 1; Previous disabled on page 1; Next disabled on last page
  • Shows total count below: "X shipment(s) available"
  • On fetch error: toast.error()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions