/* * Copyright 2023 Harness, Inc. * * 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 React from 'react' import { Route, Switch, BrowserRouter } from 'react-router-dom' import { SignIn } from 'pages/SignIn/SignIn' import { SignUp } from 'pages/SignUp/SignUp' import Repository from 'pages/Repository/Repository' import { routes, pathProps } from 'RouteDefinitions' import RepositoriesListing from 'pages/RepositoriesListing/RepositoriesListing' import PipelineList from 'pages/PipelineList/PipelineList' import SecretList from 'pages/SecretList/SecretList' import { LayoutWithSideNav, LayoutWithoutSideNav } from 'layouts/layout' import RepositoryFileEdit from 'pages/RepositoryFileEdit/RepositoryFileEdit' import RepositoryCommits from 'pages/RepositoryCommits/RepositoryCommits' import RepositoryCommit from 'pages/RepositoryCommit/RepositoryCommit' import RepositoryBranches from 'pages/RepositoryBranches/RepositoryBranches' import RepositoryTags from 'pages/RepositoryTags/RepositoryTags' import Compare from 'pages/Compare/Compare' import PullRequest from 'pages/PullRequest/PullRequest' import PullRequests from 'pages/PullRequests/PullRequests' import WebhookNew from 'pages/WebhookNew/WebhookNew' import WebhookDetails from 'pages/WebhookDetails/WebhookDetails' import Webhooks from 'pages/Webhooks/Webhooks' import RepositorySettings from 'pages/RepositorySettings/RepositorySettings' import UsersListing from 'pages/UsersListing/UsersListing' import Home from 'pages/Home/Home' import UserProfile from 'pages/UserProfile/UserProfile' import ChangePassword from 'pages/ChangePassword/ChangePassword' import SpaceAccessControl from 'pages/SpaceAccessControl/SpaceAccessControl' import SpaceSettings from 'pages/SpaceSettings/SpaceSettings' import { useStrings } from 'framework/strings' import ExecutionList from 'pages/ExecutionList/ExecutionList' import Execution from 'pages/Execution/Execution' import Secret from 'pages/Secret/Secret' import Search from 'pages/Search/Search' import CodeSearchPage from 'pages/Search/CodeSearchPage' import AddUpdatePipeline from 'pages/AddUpdatePipeline/AddUpdatePipeline' import { useAppContext } from 'AppContext' import PipelineSettings from 'components/PipelineSettings/PipelineSettings' import GitspaceDetail from 'cde/pages/GitspaceDetail/GitspaceDetail' import Gitspaces from 'cde/pages/Gitspaces/Gitspaces' import GitspacesListing from 'cde/pages/GitspacesListing/GitspacesListing' export const RouteDestinations: React.FC = React.memo(function RouteDestinations() { const { getString } = useStrings() const repoPath = `${pathProps.space}/${pathProps.repoName}` const { standalone } = useAppContext() return ( {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} {standalone && ( )} ) })