Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions web/packages/teleport/src/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,13 @@ import { Redirect, Route, Switch } from 'teleport/components/Router';
import cfg from 'teleport/config';
import { FeaturesContextProvider, useFeatures } from 'teleport/FeaturesContext';
import { Navigation } from 'teleport/Navigation';
import { Navigation as SideNavigation } from 'teleport/Navigation/SideNavigation/Navigation';
import {
ClusterAlert,
LINK_DESTINATION_LABEL,
LINK_TEXT_LABEL,
} from 'teleport/services/alerts/alerts';
import { storageService } from 'teleport/services/storageService';
import { TopBar } from 'teleport/TopBar';
import { TopBarProps } from 'teleport/TopBar/TopBar';
import { TopBar as TopBarSideNav } from 'teleport/TopBar/TopBarSideNav';
import { TopBar, TopBarProps } from 'teleport/TopBar';
import type { LockedFeatures, TeleportFeature } from 'teleport/types';
import { useUser } from 'teleport/User/UserContext';
import useTeleport from 'teleport/useTeleport';
Expand All @@ -78,13 +75,6 @@ export function Main(props: MainProps) {

const { preferences } = useUser();

const isTopBarView = storageService.getIsTopBarView();
const TopBarComponent =
//TODO(rudream): Add sidenav dashboard view.
isTopBarView || cfg.isDashboard ? TopBar : TopBarSideNav;
const NavigationComponent =
isTopBarView || cfg.isDashboard ? Navigation : SideNavigation;

useEffect(() => {
if (ctx.storeUser.state) {
setAttempt({ status: 'success' });
Expand Down Expand Up @@ -195,7 +185,7 @@ export function Main(props: MainProps) {

return (
<FeaturesContextProvider value={features}>
<TopBarComponent
<TopBar
CustomLogo={
props.topBarProps?.showPoweredByLogo
? props.topBarProps.CustomLogo
Expand All @@ -204,7 +194,7 @@ export function Main(props: MainProps) {
/>
<Wrapper>
<MainContainer>
<NavigationComponent />
<Navigation />
<ContentWrapper>
<ContentMinWidth>
<BannerList
Expand Down
Loading