@@ -877,6 +943,8 @@ const Profile: React.FC = () => {
className={`badge ${
rental.status === "completed"
? "bg-success"
+ : rental.status === "declined"
+ ? "bg-secondary"
: "bg-danger"
}`}
>
@@ -1013,6 +1081,8 @@ const Profile: React.FC = () => {
className={`badge ${
rental.status === "completed"
? "bg-success"
+ : rental.status === "declined"
+ ? "bg-secondary"
: "bg-danger"
}`}
>
@@ -1095,72 +1165,6 @@ const Profile: React.FC = () => {
)}
- {/* Personal Information Section */}
- {activeSection === "personal-info" && (
-
-
Personal Information
-
-
- )}
-
{/* Owner Settings Section */}
{activeSection === "owner-settings" && (
diff --git a/frontend/src/pages/RentItem.tsx b/frontend/src/pages/RentItem.tsx
index 937246f..818bb18 100644
--- a/frontend/src/pages/RentItem.tsx
+++ b/frontend/src/pages/RentItem.tsx
@@ -379,8 +379,13 @@ const RentItem: React.FC = () => {
Total:
{costLoading ? (
-
-
Calculating...
+
+
+ Calculating...
+
) : costError ? (
Error
diff --git a/frontend/src/pages/Renting.tsx b/frontend/src/pages/Renting.tsx
index b771c89..895d9a1 100644
--- a/frontend/src/pages/Renting.tsx
+++ b/frontend/src/pages/Renting.tsx
@@ -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 (
-
My Rentals
+
Rentals
{renterActiveRentals.length === 0 ? (
@@ -301,8 +301,7 @@ const Renting: React.FC = () => {
{rental.status === "declined" && rental.declineReason && (
- Decline reason:{" "}
- {rental.declineReason}
+ Decline reason: {rental.declineReason}
)}