feat(ca): Add analysis loading feature and update documentation to v5-Stable
This commit is contained in:
@@ -91,6 +91,15 @@ const App: React.FC = () => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleLoadAnalysis = useCallback((loadedState: AppState) => {
|
||||
if (loadedState && loadedState.step && loadedState.company) {
|
||||
setAppState(loadedState);
|
||||
setHighestStep(loadedState.step);
|
||||
} else {
|
||||
alert("Ungültige Analyse-Datei.");
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleUpdateAnalysis = useCallback((index: number, updatedAnalysis: any) => {
|
||||
setAppState(prevState => {
|
||||
if (!prevState) return null;
|
||||
@@ -410,7 +419,7 @@ const App: React.FC = () => {
|
||||
</header>
|
||||
|
||||
<main className="mx-auto">
|
||||
{!appState && !isLoading && <InputForm onStart={handleStartAnalysis} />}
|
||||
{!appState && !isLoading && <InputForm onStart={handleStartAnalysis} onLoadAnalysis={handleLoadAnalysis} />}
|
||||
|
||||
{isLoading && !appState && <LoadingSpinner t={t.loadingSpinner} />}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user