Reorg componenti in modalità server/client

This commit is contained in:
Samuele Locatelli
2025-03-19 11:04:20 +01:00
parent 813ee7e591
commit 4cc77d52e0
13 changed files with 31 additions and 29 deletions
+8 -5
View File
@@ -1,5 +1,8 @@
using MP.MON.Client.Components;
using MP.Data.Services;
using MP.MON.Components;
using MP.MON.Components.Layout;
using MP.MON.Components.Pages;
using NLog;
using NLog.Web;
using StackExchange.Redis;
@@ -8,8 +11,8 @@ var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
//.AddInteractiveWebAssemblyComponents();
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
var logger = LogManager.Setup()
@@ -57,9 +60,9 @@ app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
//.AddInteractiveWebAssemblyRenderMode()
//.AddAdditionalAssemblies(typeof(MP.MON.Client._Imports).Assembly);
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(MP.MON.Client._Imports).Assembly);
logger.Info("App: Run stage");
app.Run();