diff --git a/src/contexts/TravelerDataContext.js b/src/contexts/TravelerDataContext.js index 4961cca..6eac0a6 100644 --- a/src/contexts/TravelerDataContext.js +++ b/src/contexts/TravelerDataContext.js @@ -86,7 +86,7 @@ export const TravelerDataProvider = ({ children }) => { return ( {children} diff --git a/src/pages/travelers/Traveler.js b/src/pages/travelers/Traveler.js index fc4a642..af8d468 100644 --- a/src/pages/travelers/Traveler.js +++ b/src/pages/travelers/Traveler.js @@ -14,7 +14,7 @@ const Traveler = (props) => { const currentUser = useCurrentUser(); const is_owner = currentUser?.username === owner; - const {handleFollow} = useSetTravelerData(); + const {handleFollow, handleUnFollow} = useSetTravelerData(); return (
{ (following_id ? ( diff --git a/src/pages/travelers/TravelerPage.js b/src/pages/travelers/TravelerPage.js index 9d378b6..737fa5b 100644 --- a/src/pages/travelers/TravelerPage.js +++ b/src/pages/travelers/TravelerPage.js @@ -29,7 +29,7 @@ function TravelerPage() { const [hasLoaded, setHasLoaded] = useState(false); const currentUser = useCurrentUser(); const { id } = useParams(); - const { setTravelerData, handleFollow } = useSetTravelerData(); + const { setTravelerData, handleFollow, handleUnFollow } = useSetTravelerData(); const { pageTraveler } = useTravelerData(); const [traveler] = pageTraveler.results; const is_owner = currentUser?.username === traveler?.owner; @@ -90,7 +90,7 @@ function TravelerPage() { (traveler?.following_id ? (