moved private information, test fixes

This commit is contained in:
jackiettran
2025-11-06 17:56:12 -05:00
parent 2ee4b5c389
commit 066ad4a3fe
6 changed files with 263 additions and 165 deletions

View File

@@ -170,9 +170,9 @@ const Renting: React.FC = () => {
);
};
// Filter rentals - show active and declined rentals
// Filter rentals - show only active rentals (declined go to history)
const renterActiveRentals = rentals.filter((r) =>
["pending", "confirmed", "declined", "active"].includes(r.status)
["pending", "confirmed", "active"].includes(r.status)
);
if (loading) {
@@ -199,7 +199,7 @@ const Renting: React.FC = () => {
return (
<div className="container mt-4">
<h1>My Rentals</h1>
<h1>Rentals</h1>
{renterActiveRentals.length === 0 ? (
<div className="text-center py-5">
@@ -301,8 +301,7 @@ const Renting: React.FC = () => {
{rental.status === "declined" && rental.declineReason && (
<div className="alert alert-warning mt-2 mb-1 p-2 small">
<strong>Decline reason:</strong>{" "}
{rental.declineReason}
<strong>Decline reason:</strong> {rental.declineReason}
</div>
)}