diff --git a/src/app/components/about/about.component.html b/src/app/components/about/about.component.html index 88856c7..271cd77 100644 --- a/src/app/components/about/about.component.html +++ b/src/app/components/about/about.component.html @@ -66,9 +66,11 @@
\ No newline at end of file diff --git a/src/app/components/about/about.component.ts b/src/app/components/about/about.component.ts index 2fdf072..e586858 100644 --- a/src/app/components/about/about.component.ts +++ b/src/app/components/about/about.component.ts @@ -1,9 +1,10 @@ -import {Component, OnInit, ViewChild} from '@angular/core'; -import {Activitylist} from 'src/app/models/activity'; -import {LevelList} from 'src/app/models/levellist'; -import {MatSort} from '@angular/material/sort'; -import {MatTableDataSource} from '@angular/material/table'; -import {ActivityService} from 'src/app/services/activity/activity.service'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Activitylist } from 'src/app/models/activity'; +import { LevelList } from 'src/app/models/levellist'; +import { MatSort } from '@angular/material/sort'; +import { MatTableDataSource } from '@angular/material/table'; +import { ActivityService } from 'src/app/services/activity/activity.service'; +import { DatasharingService } from '../../services/datasharing.service'; @Component({ selector: 'app-about', @@ -11,6 +12,7 @@ import {ActivityService} from 'src/app/services/activity/activity.service'; styleUrls: ['./about.component.sass'] }) export class AboutComponent implements OnInit { + loggedIn = false; actionlist: Activitylist = new Activitylist(); levellist: LevelList = new LevelList(); @@ -19,12 +21,15 @@ export class AboutComponent implements OnInit { displayedLevelColumns = ['level', 'name']; levelSource = new MatTableDataSource(this.levellist.levels); - constructor(private activityService: ActivityService) { + constructor(private activityService: ActivityService, private data: DatasharingService) { } - @ViewChild(MatSort, {static: true}) sort: MatSort; + @ViewChild(MatSort, { static: true }) sort: MatSort; ngOnInit() { + this.data.currentUser.subscribe(user => { + this.loggedIn = user.loggedIn; + }); this.activityService.getActivities(); this.activityService.activitylist.subscribe(response => { this.actionlist = response;