Skip to content

Commit bf418a4

Browse files
committed
Remove effectively unused loading page
1 parent b5241d3 commit bf418a4

File tree

3 files changed

+2
-35
lines changed

3 files changed

+2
-35
lines changed

frontend/src/components/Contexts/AssetContext.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ interface Props {
2222
}
2323

2424
interface IAssetContext {
25-
isLoading: boolean
2625
enabledRobots: RobotWithoutTelemetry[]
2726
installationCode: string
2827
installationName: string
@@ -33,7 +32,6 @@ interface IAssetContext {
3332
}
3433

3534
const defaultAssetState = {
36-
isLoading: true,
3735
enabledRobots: [],
3836
installationCode: '',
3937
installationName: '',
@@ -50,7 +48,6 @@ export const AssetProvider: FC<Props> = ({ children }) => {
5048
const [activeInstallations, setActiveInstallations] = useState<Installation[]>([])
5149
const [selectedInstallation, setSelectedInstallation] = useState<Installation | undefined>(undefined)
5250
const [installationInspectionAreas, setInstallationInspectionAreas] = useState<InspectionArea[]>([])
53-
const [isLoading, setIsLoading] = useState<boolean>(true)
5451

5552
const { registerEvent, connectionReady, resetConnection } = useSignalRContext()
5653
const { TranslateText } = useLanguageContext()
@@ -127,7 +124,6 @@ export const AssetProvider: FC<Props> = ({ children }) => {
127124
.getEnabledRobots()
128125
.then((robots) => {
129126
setEnabledRobots(robots)
130-
setIsLoading(false)
131127
})
132128
.catch(() => {
133129
setAlert(
@@ -251,7 +247,6 @@ export const AssetProvider: FC<Props> = ({ children }) => {
251247
return (
252248
<AssetContext.Provider
253249
value={{
254-
isLoading,
255250
enabledRobots: filteredRobots,
256251
installationCode,
257252
installationName,

frontend/src/pages/FlotillaSite.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ import { MissionDefinitionPageRouter, MissionPageRouter, RobotPageRouter, Simple
1515
import { PageNotFound } from './NotFoundPage'
1616
import { useAssetContext } from 'components/Contexts/AssetContext'
1717
import { DataViewPage } from './MissionHistory/DataViewPage'
18-
import { PageLoading } from './LoadingPage'
1918

2019
export const FlotillaSite = () => {
2120
const frontPageTabOptions = Object.values(TabNames)
22-
const { isLoading, installationCode } = useAssetContext()
21+
const { installationCode } = useAssetContext()
2322

2423
const installationCodePath = `${config.FRONTEND_BASE_ROUTE}/${installationCode}`
2524

@@ -60,7 +59,7 @@ export const FlotillaSite = () => {
6059
{installationCode ? installationSpecificPages : <></>}
6160

6261
<Route path={`${config.FRONTEND_BASE_ROUTE}/info`} element={<InfoPage />} />
63-
<Route path="*" element={isLoading ? <PageLoading /> : <PageNotFound />} />
62+
<Route path="*" element={<PageNotFound />} />
6463
</Routes>
6564
</BrowserRouter>
6665
</>

frontend/src/pages/LoadingPage.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)