feat(light-js): disable subscribe button when subscribed

This commit is contained in:
fryorcraken.eth 2022-09-20 11:16:17 +10:00
parent 52a58ea845
commit 4185068867
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 2 additions and 0 deletions

View File

@ -106,12 +106,14 @@
subscribeButton.onclick = async () => {
unsubscribe = await node.filter.subscribe(callback, [ContentTopic])
unsubscribeButton.disabled = false;
subscribeButton.disabled = true;
}
unsubscribeButton.onclick = async () => {
await unsubscribe();
unsubscribe = undefined
unsubscribeButton.disabled = true;
subscribeButton.disabled = false;
}
sendButton.onclick = async () => {