Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 49abff6

Browse files
committed
Add message when there are no threads yet
1 parent 6522193 commit 49abff6

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
<mat-list class="thread-list">
2-
<ng-template
3-
*ngIf="threads$ | async as threads"
4-
ngFor
5-
let-thread
6-
let-i="index"
7-
let-first="first"
8-
[ngForOf]="threads"
9-
>
10-
<thread-date-separator
11-
*ngIf="first"
12-
class="thread-date-separator"
13-
[isoDate]="thread.createdAt"
14-
></thread-date-separator>
15-
<thread-date-separator
16-
*ngIf="!first && !(thread.createdAt | sameDay: threads[i - 1].createdAt)"
17-
class="thread-date-separator"
18-
[isoDate]="thread.createdAt"
19-
></thread-date-separator>
20-
<thread-preview class="thread-detail" [thread]="thread"></thread-preview>
1+
<mat-list class="thread-list" *ngIf="threads$ | async as threads">
2+
<div *ngIf="threads.length == 0; else showThreads">
3+
<span>Use Discussion to start a stimulating conversation with your collaborators.</span>
4+
</div>
5+
<ng-template #showThreads>
6+
<ng-template ngFor let-thread let-i="index" let-first="first" [ngForOf]="threads">
7+
<thread-date-separator
8+
*ngIf="first"
9+
class="thread-date-separator"
10+
[isoDate]="thread.createdAt"
11+
></thread-date-separator>
12+
<thread-date-separator
13+
*ngIf="!first && !(thread.createdAt | sameDay: threads[i - 1].createdAt)"
14+
class="thread-date-separator"
15+
[isoDate]="thread.createdAt"
16+
></thread-date-separator>
17+
<thread-preview class="thread-detail" [thread]="thread"></thread-preview>
18+
</ng-template>
2119
</ng-template>
2220
</mat-list>

0 commit comments

Comments
 (0)