diff --git a/public/src/components/EventCreateForm/EventCreateForm.js b/public/src/components/EventCreateForm/EventCreateForm.js index 203ecbd..e4e73a7 100644 --- a/public/src/components/EventCreateForm/EventCreateForm.js +++ b/public/src/components/EventCreateForm/EventCreateForm.js @@ -189,7 +189,7 @@ export class EventCreateForm { img.width = fileInput.width; const submitButton = this.form.querySelector('.event-create-form__submit-btn'); submitButton.innerHTML = 'Сохранить'; - submitButton.addEventListener('click', (event) => handleCreateEventEdit(event, `events/${eventData.id}`)); + submitButton.addEventListener('click', (event) => handleCreateEventEdit(event, `${eventData.id}`)); const mapping = { title: 'eventNameEntry', image: 'imageInput', diff --git a/public/src/modules/handleEventsActions.js b/public/src/modules/handleEventsActions.js index e9b73c3..69aeeaf 100644 --- a/public/src/modules/handleEventsActions.js +++ b/public/src/modules/handleEventsActions.js @@ -138,7 +138,7 @@ export async function handleCreateEventEdit(event, id) { throw new Error(data.message); } // Navigate to page - const pageToCome = `../${id}`; + const pageToCome = `events/${id}`; navigate(pageToCome); } catch (error) {