Skip to content

Commit 5a84240

Browse files
Use authentication state during static prerendering. This replicates issue #11799 in the E2E test
1 parent f3dd124 commit 5a84240

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor

+12-10
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22
@using Microsoft.AspNetCore.Components
33
@inject IComponentContext ComponentContext
44

5-
<h1>Hello</h1>
5+
<CascadingAuthenticationState>
6+
<h1>Hello</h1>
67

7-
<p>
8-
Current state:
9-
<strong id="connected-state">@(ComponentContext.IsConnected ? "connected" : "not connected")</strong>
10-
</p>
8+
<p>
9+
Current state:
10+
<strong id="connected-state">@(ComponentContext.IsConnected ? "connected" : "not connected")</strong>
11+
</p>
1112

12-
<p>
13-
Clicks:
14-
<strong id="count">@count</strong>
15-
<button id="increment-count" @onclick="@(() => count++)">Click me</button>
16-
</p>
13+
<p>
14+
Clicks:
15+
<strong id="count">@count</strong>
16+
<button id="increment-count" @onclick="@(() => count++)">Click me</button>
17+
</p>
18+
</CascadingAuthenticationState>
1719

1820
@code {
1921
int count;

0 commit comments

Comments
 (0)