Skip to content

Commit

Permalink
Use relative navigation links
Browse files Browse the repository at this point in the history
  • Loading branch information
Keller253 committed Feb 14, 2024
1 parent b2d1caa commit 1472dc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CyclingApp/Pages/Activity.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ protected override async Task OnParametersSetAsync()

private void NavigateToHome()
{
NavigationManager.NavigateTo(Home.Route);
NavigationManager.NavigateTo($".{Home.Route}");
}
}
4 changes: 2 additions & 2 deletions src/CyclingApp/Pages/Home.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ protected override async Task OnInitializedAsync()

private void NavigateToTracker()
{
NavigationManager.NavigateTo(Tracker.Route);
NavigationManager.NavigateTo($".{Tracker.Route}");
}

private void NavigateToActivity(Guid id)
{
NavigationManager.NavigateTo($"{Activity.Route}/{id}");
NavigationManager.NavigateTo($".{Activity.Route}/{id}");
}
}
2 changes: 1 addition & 1 deletion src/CyclingApp/Pages/Tracker.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private void Stop()
{
var route = new ReadOnlyRoute(_route.Waypoints);
var activity = await ActivityService.CreateActivityAsync(_creationTime, _stopWatch.Elapsed, route);
NavigationManager.NavigateTo($"{Activity.Route}/{activity.Id}");
NavigationManager.NavigateTo($".{Activity.Route}/{activity.Id}");
});
}

Expand Down

0 comments on commit 1472dc6

Please sign in to comment.