All checks were successful
Docker Image CI / build (push) Successful in 8m8s
28 lines
655 B
Plaintext
28 lines
655 B
Plaintext
@layout Layout
|
|
|
|
@inject IHttpContextAccessor HttpContextAccessor
|
|
|
|
<PageTitle>Groceries – New Store</PageTitle>
|
|
|
|
<h1>New Store</h1>
|
|
|
|
<StoreForm>
|
|
<div class="row">
|
|
<button class="button button--primary">Save</button>
|
|
<a class="button" href="@returnUrl">Cancel</a>
|
|
</div>
|
|
</StoreForm>
|
|
|
|
@code {
|
|
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;
|
|
}
|
|
}
|
|
}
|