Skip to content

Commit

Permalink
Merge pull request #179 from Lapkipomoshi/dev
Browse files Browse the repository at this point in the history
Dev to main
  • Loading branch information
bevuxyna authored Aug 30, 2023
2 parents d2fa42d + 0f72e3a commit 58816c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/modules/ShelterVacancies/ShelterVacancies.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ShelterVacancies = () => {

const [isLoading, setIsLoading] = useState(true);

const { shelter } = useOutletContext();
const { shelter, isOwner } = useOutletContext();

useEffect(() => {
if (!shelter.id) return;
Expand Down Expand Up @@ -66,10 +66,11 @@ const ShelterVacancies = () => {
<section className='shelter-vacancies'>
<div className='shelter-vacancies__title-container'>
<h2 className='shelter-vacancies__title standard-font standard-font_type_h2'>Вакансии приюта «{shelter.name}»</h2>

<Button disabled={isOpenVacancyForm} onClick={toggleVacancyForm}>
Добавить вакансию
</Button>
{isOwner && (
<Button disabled={isOpenVacancyForm} onClick={toggleVacancyForm}>
Добавить вакансию
</Button>
)}
</div>
<h3 className='standard-font_type_h3 shelter-section__subtitle'>Всего вакансий: {vacanciesList.length}</h3>
<div className='shelter-vacancies__vacancies-container'>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const App = () => {
<Route exact path='/password-recovery' element={<ProtectedRoute condition={!loggedIn} component={PasswordRecovery} />} />

<Route exact path='/activate/:uid/:token/' element={<ActivateUserPage />} />
<Route exact path='/password-reset' element={<NewPassword />} />
<Route exact path='/password-reset/:uid/:token/' element={<NewPassword />} />
<Route exact path='/email-reset/:uid/:token/:new_email' element={<ActivateEmailPage onUpdateCurrentUser={setCurrentUser} />} />

<Route path='/profile' element={<ProtectedRoute condition={loggedIn} component={ProfilePage} />} />
Expand Down

0 comments on commit 58816c3

Please sign in to comment.