35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
<ErrorBoundary @ref="_errorBoundary">
|
|
<ChildContent>
|
|
<Router AppAssembly="@typeof(Routes).Assembly">
|
|
<Found Context="routeData">
|
|
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
|
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
|
</Found>
|
|
</Router>
|
|
</ChildContent>
|
|
<ErrorContent Context="ex">
|
|
<div class="nexus-error-boundary">
|
|
<div class="error-card">
|
|
<div class="error-icon">
|
|
<NexusIcon Name="alert-triangle" Size="48" Color="#ff4444" />
|
|
</div>
|
|
<h3>Nexus System Error</h3>
|
|
<p>Wystąpił nieoczekiwany błąd podczas renderowania komponentu.</p>
|
|
|
|
<div class="error-details">
|
|
<code>@ex.Message</code>
|
|
</div>
|
|
|
|
<button class="retry-btn" @onclick="() => _errorBoundary?.Recover()">
|
|
<NexusIcon Name="refresh-cw" Size="16" />
|
|
Spróbuj ponownie
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</ErrorContent>
|
|
</ErrorBoundary>
|
|
|
|
@code {
|
|
private ErrorBoundary? _errorBoundary;
|
|
}
|