Changes to SSR

This commit is contained in:
ItzMineyy committed 2024-12-25 17:45:48 +01:00
1 parent 8ccee4a70f
commit 4422cf448b
5 files changed
+63 -36

No files matched your search

+4 -4
View File
@@ -57,11 +57,11 @@ export class AboutComponent implements OnInit, OnDestroy, AfterViewInit {
}
ngOnDestroy() {
if (isPlatformBrowser(this.platformId)) {
if (this.vantaEffect) {
this.vantaEffect.destroy(); // Clean up the effect on destroy
}
window.removeEventListener('resize', this.onResize); // Remove the listener when the component is destroyed
if (this.vantaEffect) {
this.vantaEffect.destroy(); // Clean up the effect on destroy
}
window.removeEventListener('resize', this.onResize); // Remove the listener when the component is destroyed
}
}
initVanta() {