29 lines
658 B
TypeScript
29 lines
658 B
TypeScript
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
import { Group } from '../../interfaces/group.interface';
|
|
|
|
@Component({
|
|
selector: 'app-group-list',
|
|
templateUrl: './group-list.component.html',
|
|
styleUrls: ['./group-list.component.scss']
|
|
})
|
|
export class GroupListComponent implements OnInit {
|
|
|
|
@Input() groups: Group[];
|
|
@Output() joinRequest = new EventEmitter<number>();
|
|
@Output() show = new EventEmitter<number>();
|
|
|
|
constructor() { }
|
|
|
|
ngOnInit(): void {
|
|
}
|
|
|
|
onShow(groupId: number): void {
|
|
this.show.emit(groupId);
|
|
}
|
|
|
|
onJoinRequest(groupId: number): void {
|
|
this.joinRequest.emit(groupId);
|
|
}
|
|
|
|
}
|