Skip to content

Commit 566f96b

Browse files
authored
- Do not show dismiss link whne there are no notifications (#4493)
- Do not redirect to homepage whne dismiss link is clicked
1 parent f11be43 commit 566f96b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/Demo/Shared/Components/NotificationCenterPanel.razor

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55

66
<FluentStack>
77
<FluentSpacer />
8-
<FluentAnchor Appearance="@Appearance.Hypertext" Href="" OnClick="@(e => MessageService.Clear(App.MESSAGES_NOTIFICATION_CENTER) )">
9-
Dismiss all
10-
</FluentAnchor>
8+
@if (MessageService.Count(App.MESSAGES_NOTIFICATION_CENTER) > 0)
9+
{
10+
<FluentAnchor Appearance="@Appearance.Hypertext" Href="#" OnClick="@(e => MessageService.Clear(App.MESSAGES_NOTIFICATION_CENTER))">
11+
Dismiss all
12+
</FluentAnchor>
13+
}
1114
</FluentStack>
1215

1316
<br />

0 commit comments

Comments
 (0)