/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { useEffect } from 'react'; import { WorkspaceSetup } from './workspace-setup/WorkspaceSetup.js'; import { Editor } from './editor/Editor.js'; import { ProjectReviewer } from './project-reviewer/ProjectReviewer.js'; import { ProjectViewer } from './project-view/ProjectViewer.js'; import { observer } from 'mobx-react-lite'; import { clsx, CubesLoadingIndicator, CubesLoadingIndicatorIcon, GhostIcon, MarkdownTextViewer, } from '@finos/legend-art'; import { LEGEND_STUDIO_ROUTE_PATTERN, LEGEND_STUDIO_SDLC_BYPASSED_ROUTE_PATTERN, } from '../__lib__/LegendStudioNavigation.js'; import { flowResult } from 'mobx'; import { LegendStudioFrameworkProvider, useLegendStudioApplicationStore, useLegendStudioBaseStore, } from './LegendStudioFrameworkProvider.js'; import { useApplicationStore, LegendTokenSync, ExtensionPageBoundary, LegendApplicationTelemetryHelper, } from '@finos/legend-application'; import { BrowserEnvironmentProvider, generateExtensionUrlPattern, Route, Routes, } from '@finos/legend-application/browser'; import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../__lib__/LegendStudioDocumentation.js'; import { LazyTextEditor } from './lazy-text-editor/LazyTextEditor.js'; import { PureCompatibilityTestManager } from './pct/PureCompatibilityTest.js'; import { ShowcaseViewer } from './showcase/ShowcaseViewer.js'; import { AuthProvider, withAuthenticationRequired, type AuthProviderProps, } from 'react-oidc-context'; import type { User } from 'oidc-client-ts'; const NotFoundPage = observer(() => { const applicationStore = useApplicationStore(); const currentPath = applicationStore.navigationService.navigator.getCurrentLocation(); useEffect(() => { LegendApplicationTelemetryHelper.logEvent_RouteNotFound( applicationStore.telemetryService, { path: currentPath }, ); }, [applicationStore, currentPath]); const documentation = applicationStore.documentationService.getDocEntry( LEGEND_STUDIO_DOCUMENTATION_KEY.NOT_FOUND_HELP, ); return (