refactor mylistings and my rentals
This commit is contained in:
@@ -48,7 +48,7 @@ const ItemDetail: React.FC = () => {
|
||||
|
||||
const checkIfAlreadyRenting = async () => {
|
||||
try {
|
||||
const response = await rentalAPI.getMyRentals();
|
||||
const response = await rentalAPI.getRentals();
|
||||
const rentals: Rental[] = response.data;
|
||||
// Check if user has an active rental for this item
|
||||
const hasActiveRental = rentals.some(
|
||||
|
||||
Reference in New Issue
Block a user