From 6f0c667bddd492d509fee2d91315b98ea1f152ff Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 6 Apr 2025 17:48:44 +0200 Subject: [PATCH] Revert "Add OnInit to components to scroll to top on initialization" This reverts commit d4e231f67bfdecfd1d45fb44f4a43353068deba5. --- frontend/src/app/about/about.component.ts | 8 ++------ frontend/src/app/privacy/privacy.component.ts | 8 ++------ frontend/src/app/team/team.component.ts | 8 ++------ frontend/src/app/terms/terms.component.ts | 8 ++------ 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/frontend/src/app/about/about.component.ts b/frontend/src/app/about/about.component.ts index 3285859..2f80864 100644 --- a/frontend/src/app/about/about.component.ts +++ b/frontend/src/app/about/about.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {ScrollService} from '../scroll/scroll.service'; @Component({ @@ -7,11 +7,7 @@ import {ScrollService} from '../scroll/scroll.service'; templateUrl: './about.component.html', styleUrl: './about.component.scss' }) -export class AboutComponent implements OnInit { +export class AboutComponent { constructor(public scrollService: ScrollService) { } - - ngOnInit(): void { - this.scrollService.scrollToTop(); - } } diff --git a/frontend/src/app/privacy/privacy.component.ts b/frontend/src/app/privacy/privacy.component.ts index 9ced929..396ccd9 100644 --- a/frontend/src/app/privacy/privacy.component.ts +++ b/frontend/src/app/privacy/privacy.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {ScrollService} from '../scroll/scroll.service'; @Component({ @@ -7,12 +7,8 @@ import {ScrollService} from '../scroll/scroll.service'; templateUrl: './privacy.component.html', styleUrl: './privacy.component.scss' }) -export class PrivacyComponent implements OnInit { +export class PrivacyComponent { constructor(public scrollService: ScrollService) { } - ngOnInit(): void { - this.scrollService.scrollToTop(); - } - } diff --git a/frontend/src/app/team/team.component.ts b/frontend/src/app/team/team.component.ts index 1936075..3ad56de 100644 --- a/frontend/src/app/team/team.component.ts +++ b/frontend/src/app/team/team.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {ScrollService} from '../scroll/scroll.service'; @Component({ @@ -7,11 +7,7 @@ import {ScrollService} from '../scroll/scroll.service'; templateUrl: './team.component.html', styleUrl: './team.component.scss' }) -export class TeamComponent implements OnInit { +export class TeamComponent { constructor(public scrollService: ScrollService) { } - - ngOnInit(): void { - this.scrollService.scrollToTop(); - } } diff --git a/frontend/src/app/terms/terms.component.ts b/frontend/src/app/terms/terms.component.ts index 57944c5..59f7183 100644 --- a/frontend/src/app/terms/terms.component.ts +++ b/frontend/src/app/terms/terms.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {ScrollService} from '../scroll/scroll.service'; @Component({ @@ -7,12 +7,8 @@ import {ScrollService} from '../scroll/scroll.service'; templateUrl: './terms.component.html', styleUrl: './terms.component.scss' }) -export class TermsComponent implements OnInit { +export class TermsComponent { constructor(public scrollService: ScrollService) { } - ngOnInit(): void { - this.scrollService.scrollToTop(); - } - }