Skip to content

Commit

Permalink
#25 Destructure handle follow function and add to btn
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Jun 29, 2023
1 parent 7bb10c8 commit 7318944
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/travelers/TravelerPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function TravelerPage() {
const [hasLoaded, setHasLoaded] = useState(false);
const currentUser = useCurrentUser();
const { id } = useParams();
const setTravelerData = useSetTravelerData();
const { setTravelerData, handleFollow } = useSetTravelerData();
const { pageTraveler } = useTravelerData();
const [traveler] = pageTraveler.results;
const is_owner = currentUser?.username === traveler?.owner;
Expand Down Expand Up @@ -97,7 +97,7 @@ function TravelerPage() {
) : (
<Button
className={`${btnStyles.Button} ${btnStyles.PinkOutline}`}
onClick={() => {}}
onClick={() => handleFollow(traveler)}
>
follow
</Button>
Expand Down

0 comments on commit 7318944

Please sign in to comment.