Skip to content

Commit

Permalink
[#329] Don't use RenderMode.WebAssembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarmil committed Nov 3, 2023
1 parent b7094d9 commit a8a866a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Bolero.Server/Components.fs
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ module Rendering =
let private emptyContent = Task.FromResult { new IHtmlContent with member _.WriteTo(_, _) = () }

let internal renderComponentAsync (html: IHtmlHelper) (componentType: Type) (config: IBoleroHostConfig) (parameters: obj) =
let mode =
match config.IsServer, config.IsPrerendered with
| true, true -> RenderMode.ServerPrerendered
| true, false -> RenderMode.Server
| false, true -> RenderMode.WebAssemblyPrerendered
| false, false -> RenderMode.WebAssembly
html.RenderComponentAsync(componentType, mode, parameters)
match config.IsServer, config.IsPrerendered with
| true, true -> html.RenderComponentAsync(componentType, RenderMode.ServerPrerendered, parameters)
| true, false -> html.RenderComponentAsync(componentType, RenderMode.Server, parameters)
| false, true -> html.RenderComponentAsync(componentType, RenderMode.Static, parameters)
| false, false -> emptyContent

type [<Struct>] RenderType =
| FromConfig of IBoleroHostConfig
Expand Down

0 comments on commit a8a866a

Please sign in to comment.