updated links

This commit is contained in:
jackiettran
2025-11-07 13:34:24 -05:00
parent 066ad4a3fe
commit e20e33a0f6
4 changed files with 38 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
import React, { useState, useEffect, useCallback } from "react";
import { useNavigate } from "react-router-dom";
import { useAuth } from "../contexts/AuthContext";
import { userAPI, itemAPI, rentalAPI, addressAPI } from "../services/api";
import { User, Item, Rental, Address } from "../types";
@@ -14,6 +15,7 @@ import {
const Profile: React.FC = () => {
const { user, updateUser, logout } = useAuth();
const navigate = useNavigate();
const [loading, setLoading] = useState(true);
const [editing, setEditing] = useState(false);
const [error, setError] = useState<string | null>(null);
@@ -970,8 +972,12 @@ const Profile: React.FC = () => {
{rental.owner && (
<p className="mb-1 small">
<strong>Owner:</strong>{" "}
{rental.owner.firstName}{" "}
{rental.owner.lastName}
<span
onClick={() => navigate(`/users/${rental.ownerId}`)}
style={{ cursor: "pointer" }}
>
{rental.owner.firstName} {rental.owner.lastName}
</span>
</p>
)}
@@ -1071,8 +1077,12 @@ const Profile: React.FC = () => {
{rental.renter && (
<p className="mb-1 small">
<strong>Renter:</strong>{" "}
{rental.renter.firstName}{" "}
{rental.renter.lastName}
<span
onClick={() => navigate(`/users/${rental.renterId}`)}
style={{ cursor: "pointer" }}
>
{rental.renter.firstName} {rental.renter.lastName}
</span>
</p>
)}