@using Groceries.Data @layout Layout @inject IHttpContextAccessor HttpContextAccessor Groceries – Edit Store

Edit Store

Cancel
@code { [Parameter] public required Store Store { get; set; } private string returnUrl = "/stores?page=1"; protected override void OnInitialized() { var request = HttpContextAccessor.HttpContext!.Request; if (request.GetReferrerIfSameOrigin() is Uri referrer && referrer != request.GetUri()) { returnUrl = referrer.PathAndQuery; } } }