Skip to content

Conversation

@emmanuelcobbinah007
Copy link

Refactor Shipment Views: Awaiting Shipments & Shipping History

Why

Avoids code duplication between shipment views.
Makes it easy to add new shipment views in the future.
Improves maintainability and clarity of the codebase.

How to Test

Visit /awaiting to see all non-delivered shipments.
Visit /history to see only delivered shipments.
Use the search bar and status filter to test filtering.
Confirm that the UI and filtering work as expected.

- Refactored PastShipments into a generic ShipmentsPage component
- Added AwaitingShipments and ShippingHistory wrappers for clear routing
- Updated router to use new components for /awaiting and /history
- Implemented reusable SearchBar, StatusFilter, and ShipmentList components
- Added dummy data with local and international destinations
- Improved filtering by status and search
- Deprecated PastShipments.tsx in favor of new structure
…ith AwaitingShipments and ShippingHistory wrappers

- Created ShipmentsPage component to handle generic shipment listing, filtering, and search
- Added AwaitingShipments and ShippingHistory wrappers for clear route separation
- Updated router to use new components for /awaiting and /history
- Left PastShipments.tsx as deprecated with a note for reference
- Improved maintainability and future extensibility of shipment views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant