diff --git a/kinode/packages/contacts/pkg/ui/script.js b/kinode/packages/contacts/pkg/ui/script.js index 830ffe14..67b3cac0 100644 --- a/kinode/packages/contacts/pkg/ui/script.js +++ b/kinode/packages/contacts/pkg/ui/script.js @@ -1,14 +1,5 @@ const APP_PATH = '/contacts:contacts:sys/ask'; -// Fetch initial data and populate the UI -function init() { - fetch(APP_PATH) - .then(response => response.json()) - .then(data => { - populate(data); - }); -} - function api_call(body) { fetch(APP_PATH, { method: 'POST', @@ -65,9 +56,6 @@ document.getElementById('add-contact').addEventListener('submit', (e) => { }); }) -// Call init to start the application -init(); - // Setup WebSocket connection const wsProtocol = location.protocol === 'https:' ? 'wss://' : 'ws://'; const ws = new WebSocket(wsProtocol + location.host + "/contacts:contacts:sys/");