<div *ngIf="currentUser !== '' ">
  <br />
  <br />
  <hr>
  <div>
    <button class="button" (click)="toggle()" *ngIf="!display"><i class="far fa-comment-alt"></i> Komentarze</button>
    <button class="button" (click)="toggle()" *ngIf="display"><i class="fas fa-angle-up"></i> ZWIŃ</button>

  </div>
  <div>
    <div *ngIf="display">
      <br />
      <br />
      <div>
        Dodaj komentarz: <br />
        <textarea name="comment" class="form-control" rows="10" [(ngModel)]="comment"></textarea>
        <br />
        <button class="button" (click)="submitComment()"><i class="fas fa-plus"></i> Dodaj</button>
      </div>
      <div *ngFor="let comment of comments.slice().reverse(); let i = index">
        <hr>
        <div class="comment">
          Kto: {{comment.username}} <br />
          Komentarz: <br />
          {{comment.text}}<br/>
          <button class="btn btn-study-cave" *ngIf="currentUser.username === comment.username" (click)="deleteComment(comment)"
            title="Usuń"><i class="fas fa-trash-alt"></i></button>
        </div>
      </div>
    </div>
  </div>
</div>
