Voegt boodschappenlijsten, productbeheer, realtime synchronisatie en browsercache-updates toe. Herstelt login- en sessiegedrag en maakt database-seeding herhaalbaar.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
12 lines
363 B
JavaScript
12 lines
363 B
JavaScript
(() => {
|
|
const socket = window.io && window.io();
|
|
if (!socket) return;
|
|
|
|
const listMatch = window.location.pathname.match(/^\/lists\/(\d+)$/);
|
|
if (listMatch) socket.emit("list:join", listMatch[1]);
|
|
|
|
socket.on("list:updated", ({ listId }) => {
|
|
if (window.location.pathname === `/lists/${listId}`) window.location.reload();
|
|
});
|
|
})();
|