diff --git a/public/src/components/EventCreateForm/EventCreateForm.js b/public/src/components/EventCreateForm/EventCreateForm.js index 84d29ce..7c20757 100644 --- a/public/src/components/EventCreateForm/EventCreateForm.js +++ b/public/src/components/EventCreateForm/EventCreateForm.js @@ -184,6 +184,7 @@ export class EventCreateForm { reader.readAsDataURL(file); } }); + console.log(eventData); if (eventData) { console.log('createtefevtnt'); img.src = `${endpoint}/${eventData.image}`; diff --git a/public/src/index.js b/public/src/index.js index 57b819c..9c88a7c 100644 --- a/public/src/index.js +++ b/public/src/index.js @@ -230,10 +230,8 @@ const routes = { '/add_event': async() => { newsFeed.innerHTML = ''; // Clear the modal window content const categSelect = await loadCategories(); - const formCreate = new EventCreateForm().renderTemplate(categSelect); + const formCreate = new EventCreateForm().renderTemplate(categSelect, null); newsFeed.appendChild(formCreate); - //const createBtn = document.getElementById('eventSubmitBtn'); - //createBtn.addEventListener('click', (event) => handleCreateEventSubmit(event, '/events/my', navigate)); }, '/edit_event': async(id) => { @@ -242,8 +240,6 @@ const routes = { const eventData = await loadEvent(id); const formCreate = new EventCreateForm().renderTemplate(categSelect, eventData); newsFeed.appendChild(formCreate); - const createBtn = document.getElementById('eventSubmitBtn'); - createBtn.addEventListener('click', (event) => handleCreateEventEdit(event, id, navigate)); }, '/notifications': async(id) => { newsFeed.innerHTML = ''; // Clear the modal window content