Skip to content

Commit

Permalink
fixed authentication rendering mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb committed May 6, 2024
1 parent 3ab776f commit 95634cb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/DrawTogether/Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@
</head>

<body>
<Routes @rendermode="InteractiveServer"/>
<Routes @rendermode="@RenderModeForPage"/>
<script src="_framework/blazor.web.js"></script>
</body>

</html>
</html>

@code {
[CascadingParameter]
private HttpContext HttpContext { get; set; } = default!;

private IComponentRenderMode? RenderModeForPage => HttpContext.Request.Path.StartsWithSegments("/Account") ? null : InteractiveServer;
}

0 comments on commit 95634cb

Please sign in to comment.