fix([2fd88f42]): add react error boundary to debug blank page
This commit is contained in:
@@ -4,6 +4,7 @@ import './App.css';
|
||||
import FileUpload from './components/FileUpload';
|
||||
import FilterPanel from './components/FilterPanel';
|
||||
import MapDisplay from './components/MapDisplay';
|
||||
import ErrorBoundary from './components/ErrorBoundary';
|
||||
|
||||
// Define types for our state
|
||||
export interface FilterOptions {
|
||||
@@ -52,30 +53,32 @@ function App() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<h1>German PLZ Heatmap Tool</h1>
|
||||
</header>
|
||||
<main className="App-main">
|
||||
<div className="control-panel">
|
||||
<FileUpload
|
||||
onUploadSuccess={handleUploadSuccess}
|
||||
setIsLoading={setIsLoading}
|
||||
setError={setError}
|
||||
/>
|
||||
<FilterPanel
|
||||
filters={filters}
|
||||
onFilterChange={handleFilterChange}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
<ErrorBoundary>
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<h1>German PLZ Heatmap Tool</h1>
|
||||
</header>
|
||||
<main className="App-main">
|
||||
<div className="control-panel">
|
||||
<FileUpload
|
||||
onUploadSuccess={handleUploadSuccess}
|
||||
setIsLoading={setIsLoading}
|
||||
setError={setError}
|
||||
/>
|
||||
<FilterPanel
|
||||
filters={filters}
|
||||
onFilterChange={handleFilterChange}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
</div>
|
||||
<div className="map-container">
|
||||
{isLoading && <p>Loading map data...</p>}
|
||||
{error && <p className="error">{error}</p>}
|
||||
<MapDisplay heatmapData={heatmapData} />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div className="map-container">
|
||||
{isLoading && <p>Loading map data...</p>}
|
||||
{error && <p className="error">{error}</p>}
|
||||
<MapDisplay heatmapData={heatmapData} />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user