Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to main #179

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading