Addet a backbutton to home page and fix the pr error

This commit is contained in:
2026-08-27 10:18:48 +02:00
parent 8de6ff9338
commit 770e170d0e
4 changed files with 61 additions and 8 deletions

View File

@@ -1,15 +1,19 @@
using System.Globalization;
using System.Globalization;
namespace Pos.Web.Components.Shared
{
public partial class Header
{
private readonly CultureInfo _danishCulture =
CultureInfo.GetCultureInfo("da-DK");
CultureInfo.GetCultureInfo("da-DK");
private readonly Timer _timer;
private DateTime _currentTime = DateTime.Now;
private bool IsHomePage =>
string.IsNullOrEmpty(
NavigationManager.ToBaseRelativePath(NavigationManager.Uri));
public Header()
{
_timer = new Timer(
@@ -25,6 +29,11 @@ namespace Pos.Web.Components.Shared
_ = InvokeAsync(StateHasChanged);
}
private void GoToHome()
{
NavigationManager.NavigateTo("/");
}
public void Dispose()
{
_timer.Dispose();