mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 15:09:10 +00:00
fix(operator): only show error empty state when no rundown data is available
The operator view previously replaced its content with the full-page error state on any query error, even when a previously fetched rundown was still cached. Now it falls back to rendering the cached data and only shows the error placeholder if a rundown has never been received.
This commit is contained in:
@@ -36,7 +36,8 @@ export default function OperatorLoader() {
|
|||||||
return <Loader />;
|
return <Loader />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === 'error') {
|
// only show the error state if we have never received data to fall back on
|
||||||
|
if (status === 'error' && data.rundown.revision === -1) {
|
||||||
return <EmptyPage variant='error' text='There was an error fetching data, please refresh the page.' />;
|
return <EmptyPage variant='error' text='There was an error fetching data, please refresh the page.' />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user