Skip to content

Commit

Permalink
SSR auth fixes (#31)
Browse files Browse the repository at this point in the history
* fixed breakage with server rendering

* fixed authentication rendering mode
  • Loading branch information
Aaronontheweb authored May 6, 2024
1 parent 87c8a0e commit d4c85be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/DrawTogether.Actors/Local/LocalDrawingSessionActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ protected override void PreStart()
.PreMaterialize(_materializer);

_debouncer = sourceRef;
source.GroupedWithin(10, TimeSpan.FromMilliseconds(75))
source.GroupedWithin(100, TimeSpan.FromMilliseconds(75))
.Select(c => TransmitActions(c.ToList()))
.SelectMany(c => c)
.SelectAsync(1, async c =>
{
try
Expand Down
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 d4c85be

Please sign in to comment.