@using Microsoft.AspNetCore.Components.Authorization @inject NavigationManager navigationManager

Sorry, you seem to have landed nowhere.

@navigationManager.Uri
@code { protected override void OnAfterRender(bool firstRender) { string? shareString = Preferences.Get("shareString", null); if (!string.IsNullOrWhiteSpace(shareString)) { Preferences.Remove("shareString"); navigationManager.NavigateTo($"/sharetext/{shareString}"); } } }