Skip to content

Commit

Permalink
correct path
Browse files Browse the repository at this point in the history
  • Loading branch information
Ko71k committed Dec 17, 2024
1 parent 4e9ec49 commit 993ab42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/src/components/EventCreateForm/EventCreateForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion public/src/modules/handleEventsActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 993ab42

Please sign in to comment.