diff --git a/src/components/ProfileSheltersBlock/ProfileSheltersBlock.jsx b/src/components/ProfileSheltersBlock/ProfileSheltersBlock.jsx index 7f59f8b5..4bad37e6 100644 --- a/src/components/ProfileSheltersBlock/ProfileSheltersBlock.jsx +++ b/src/components/ProfileSheltersBlock/ProfileSheltersBlock.jsx @@ -1,15 +1,16 @@ -import React from 'react'; +import React, { useContext } from 'react'; import { useNavigate } from 'react-router-dom'; import './ProfileSheltersBlock.scss'; import ShelterCard from '../ShelterCard/ShelterCard'; import Button from '../../ui/Button/Button'; +import CurrentUserContext from '../../contexts/CurrentUserContext'; const ProfileSheltersBlock = ({ myShelters, sheltersTitle }) => { + const { own_shelter } = useContext(CurrentUserContext); const navigate = useNavigate(); - return (