Skip to content

Commit

Permalink
Add dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre authored Sep 21, 2023
1 parent d5f0fb8 commit 96b465c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/components/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class MainPage extends UIX.BaseComponent {
@id declare inputPiDigits: HTMLInputElement;
@id declare torAddress: HTMLInputElement;

@standalone
async createVanityAddress() {
const parent = this.torAddress.parentElement!;
if (parent.classList.contains("hidden"))
Expand All @@ -42,7 +41,6 @@ export class MainPage extends UIX.BaseComponent {
disposeThread(...threads);
}

@standalone
async computePI() {
const parent = this.inputPiDigits.parentElement!;
if (parent.classList.contains("hidden"))
Expand All @@ -53,5 +51,6 @@ export class MainPage extends UIX.BaseComponent {
const pi = await thread.calculatePI(+this.inputPiDigits.value || 10);
parent.querySelector("section")!.prepend(<span>{pi}</span>)
parent.classList.remove("hidden");
disposeThread(thread);
}
}
}

0 comments on commit 96b465c

Please sign in to comment.