about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/App.razor
blob: e2a241d6410604c6b04ef3a09663c3d261ab4c06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@using MatrixRoomUtils.Core
<Router AppAssembly="@typeof(App).Assembly">
    <Found Context="routeData">
        <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
        <FocusOnNavigate RouteData="@routeData" Selector="h1"/>
    </Found>
    <NotFound>
        <PageTitle>Not found</PageTitle>
        <LayoutView Layout="@typeof(MainLayout)">
            <p role="alert">Sorry, there's nothing at this address.</p>
        </LayoutView>
    </NotFound>
</Router>

@code {
    protected override async Task OnInitializedAsync()
    {
        if (!RuntimeCache.WasLoaded)
        {
            await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage);
            Console.WriteLine("Loaded from local storage");
            StateHasChanged();
        }
    }

}