Harden components: add ErrorBoundary, null-safe rendering
This commit is contained in:
@@ -4,6 +4,7 @@ import StorageOverview from './components/StorageOverview';
|
||||
import SmeltingPanel from './components/SmeltingPanel';
|
||||
import CraftingPanel from './components/CraftingPanel';
|
||||
import AlertsPanel from './components/AlertsPanel';
|
||||
import ErrorBoundary from './components/ErrorBoundary';
|
||||
import { useInventoryStore } from './store/inventoryStore';
|
||||
import './App.css';
|
||||
|
||||
@@ -50,7 +51,9 @@ function App() {
|
||||
|
||||
<div className="app-content">
|
||||
<div className="sidebar">
|
||||
<StorageOverview />
|
||||
<ErrorBoundary>
|
||||
<StorageOverview />
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
<div className="main-panel">
|
||||
<div className="panel-tabs">
|
||||
@@ -80,7 +83,9 @@ function App() {
|
||||
</button>
|
||||
</div>
|
||||
<div className="panel-content-wrapper">
|
||||
{renderPanelContent()}
|
||||
<ErrorBoundary>
|
||||
{renderPanelContent()}
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user