taking username from profile for comments
Deploy / deploy (push) Successful in 38s

This commit is contained in:
2026-05-07 20:38:35 +02:00
parent 925bc427e6
commit 9dba20441c
+1 -1
View File
@@ -286,7 +286,7 @@ async function addComment(eventId, el) {
const input = container.querySelector('.comment-input');
const body = input.value.trim();
if (!body) return;
const author = prompt('Your name:') || 'Anonymous';
const author = currentUser || 'Anonymous';
await apiFetch('comments', { method: 'POST', body: JSON.stringify({ event_id: eventId, author, body }) });
input.value = '';
loadEvents();