diff --git a/src/app/components/social/groups/groups.component.html b/src/app/components/social/groups/groups.component.html
index 85a4121..286c13d 100644
--- a/src/app/components/social/groups/groups.component.html
+++ b/src/app/components/social/groups/groups.component.html
@@ -7,7 +7,7 @@
+ [class.selected]="group === selectedGroup" (click)="showGroupProfile(group)">
{{group.name}}
diff --git a/src/app/components/social/groups/groups.component.sass b/src/app/components/social/groups/groups.component.sass
index c427c81..16ab88d 100644
--- a/src/app/components/social/groups/groups.component.sass
+++ b/src/app/components/social/groups/groups.component.sass
@@ -9,6 +9,7 @@
box-sizing: border-box
width: 100%
margin-top: 0.5em
+ cursor: pointer
.mat-card-subtitle
margin: 0
diff --git a/src/app/components/social/groups/groups.component.ts b/src/app/components/social/groups/groups.component.ts
index 84a28f0..702d449 100644
--- a/src/app/components/social/groups/groups.component.ts
+++ b/src/app/components/social/groups/groups.component.ts
@@ -1,9 +1,10 @@
-import { Component, Inject, OnInit } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { GroupInfo } from 'src/app/models/groupinfo';
import {MatDialog, MatDialogRef} from '@angular/material/dialog';
import { SocialService } from 'src/app/services/social/social.service';
import { User } from 'src/app/models/user';
import { DatasharingService } from 'src/app/services/datasharing.service';
+import { Router } from '@angular/router';
// DIALOG COMPONENT to create groups
@Component({
@@ -38,13 +39,17 @@ export class DialogCreateGroupComponent {
})
export class GroupsComponent implements OnInit {
user: User;
- constructor(public dialog: MatDialog, private data: DatasharingService) { }
+ constructor(public dialog: MatDialog, private data: DatasharingService, private router: Router) { }
ngOnInit() {
this.data.currentUserInfo.subscribe(user => {
this.user = user; });
}
+ public showGroupProfile(group: GroupInfo) {
+ this.router.navigate(['group/' + group.id]);
+ }
+
openDialog(): void {
const dialogRef = this.dialog.open(DialogCreateGroupComponent, {
width: '250px'