From d4c85be6c990774052da3523574ee3671fdc834e Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Mon, 6 May 2024 18:06:02 +0200 Subject: [PATCH] SSR auth fixes (#31) * fixed breakage with server rendering * fixed authentication rendering mode --- .../Local/LocalDrawingSessionActor.cs | 3 ++- src/DrawTogether/Components/App.razor | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/DrawTogether.Actors/Local/LocalDrawingSessionActor.cs b/src/DrawTogether.Actors/Local/LocalDrawingSessionActor.cs index 0307e43..9a9577a 100644 --- a/src/DrawTogether.Actors/Local/LocalDrawingSessionActor.cs +++ b/src/DrawTogether.Actors/Local/LocalDrawingSessionActor.cs @@ -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 diff --git a/src/DrawTogether/Components/App.razor b/src/DrawTogether/Components/App.razor index e4eee58..c31e25b 100644 --- a/src/DrawTogether/Components/App.razor +++ b/src/DrawTogether/Components/App.razor @@ -13,8 +13,15 @@ - + - \ No newline at end of file + + +@code { + [CascadingParameter] + private HttpContext HttpContext { get; set; } = default!; + + private IComponentRenderMode? RenderModeForPage => HttpContext.Request.Path.StartsWithSegments("/Account") ? null : InteractiveServer; +} \ No newline at end of file