Routes.razor 759 B

1234567891011121314151617181920212223242526272829303132333435
  1. @using RackPeek.Web.Components.Pages
  2. @using Shared.Rcl
  3. @using Shared.Rcl.AccessPoints
  4. @using Shared.Rcl.Layout
  5. @using Shared.Rcl.Servers
  6. @using RackPeek.Domain.Persistence
  7. @inject IResourceCollection Resources
  8. @if (!_ready)
  9. {
  10. <p>Loading…</p>
  11. }
  12. else
  13. {
  14. <Router AppAssembly="@typeof(App).Assembly"
  15. AdditionalAssemblies="new[] { typeof(ServersListPage).Assembly }"
  16. NotFoundPage="typeof(NotFound)">
  17. <Found Context="routeData">
  18. <RouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)"/>
  19. </Found>
  20. </Router>
  21. }
  22. @code {
  23. private bool _ready;
  24. protected override async Task OnInitializedAsync()
  25. {
  26. await Resources.LoadAsync();
  27. _ready = true;
  28. }
  29. }