Removed Immediate.Apis, Added AOT Testing Scripts.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using Htmx.ApiDemo.Templates.Components;
|
||||
using Immediate.Apis.Shared;
|
||||
using Immediate.Handlers.Shared;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Htmx.ApiDemo.Templates;
|
||||
@@ -364,24 +362,4 @@ public sealed class UiDemo : UiDemoBase
|
||||
protected override void RenderDropdownDemo(HtmxRenderContext ctx) => DropdownDemo.Render(ctx);
|
||||
|
||||
protected override void RenderToastViewportDemo(HtmxRenderContext ctx) => ToastViewportDemo.Render(ctx);
|
||||
}
|
||||
|
||||
|
||||
[Handler]
|
||||
[MapGet("/ui-demo")]
|
||||
public static partial class GetUiDemoHandler
|
||||
{
|
||||
public class Query;
|
||||
|
||||
private static ValueTask<IResult> HandleAsync(
|
||||
Query query,
|
||||
IHttpContextAccessor httpContextAccessor,
|
||||
CancellationToken token)
|
||||
{
|
||||
var context = httpContextAccessor.HttpContext
|
||||
?? throw new InvalidOperationException("HttpContext is not available.");
|
||||
|
||||
var page = new UiDemo();
|
||||
return ValueTask.FromResult<IResult>(context.WriteHtmxPage(page, title: "UI Demo", appName: "HtmxApp", pageTitle: "UI Components"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user