Skip to content

Commit

Permalink
fix(SignupPage.tsx): Prevent deleting snow div
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRainbow44 committed Jul 27, 2024
1 parent 03145ad commit 8b0535b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ui/pages/SignupPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ function SignupPage() {
const [confirm, setConfirm] = useState("");

useEffect(() => {
spawnSnow(defaultDensity, document.getElementById("snow") as HTMLDivElement);
const snowDiv = document.getElementById("snow") as HTMLDivElement;

spawnSnow(defaultDensity, snowDiv);
spawnSnowCSS(defaultDensity, "SignupPage");

return () => {
document.getElementById("snow")?.remove();
document.getElementById("snow-css")?.remove();
// Clear the children of the snow div.
snowDiv.innerHTML = "";
};
});

Expand Down

0 comments on commit 8b0535b

Please sign in to comment.