import {Component, OnInit} from '@angular/core'; import {Router} from '@angular/router'; import {UsersService} from '../../services/users.service'; @Component({ selector: 'app-funding-basket', standalone: false, templateUrl: './funding-basket.component.html', styleUrl: './funding-basket.component.css' }) export class FundingBasketComponent implements OnInit{ constructor( private router: Router, private userService: UsersService ) {} ngOnInit() { if (!this.userService.getCurrentUser()) { this.router.navigate(['/login'], {queryParams: {redir: this.router.url}}) } } }