@page "/not-found"
@inject ILocalizationService Loc
@rendermode InteractiveServer
@Loc["notfound.message"]
@Loc["notfound.link.back_to_home"] @code { [CascadingParameter] private HttpContext? HttpContext { get; set; } protected override void OnInitialized() { if (HttpContext is not null) { HttpContext.Response.StatusCode = StatusCodes.Status404NotFound; } } }