diff --git a/editor/src/components/navigator/left-pane/index.tsx b/editor/src/components/navigator/left-pane/index.tsx index 5020734c5fc7..5ab4f6319600 100644 --- a/editor/src/components/navigator/left-pane/index.tsx +++ b/editor/src/components/navigator/left-pane/index.tsx @@ -17,6 +17,8 @@ import { NavigatorComponent } from '../navigator' import { ContentsPane } from './contents-pane' import { GithubPane } from './github-pane' import type { StoredPanel } from '../../canvas/stored-layout' +import { useIsMyProject } from '../../editor/store/collaborative-editing' +import { when } from '../../../utils/react-conditionals' export interface LeftPaneProps { editorState: EditorState @@ -63,6 +65,8 @@ export const LeftPaneComponent = React.memo((props) => { onClickTab(LeftMenuTab.Github) }, [onClickTab]) + const isMyProject = useIsMyProject() + return ( ((props) => { overflowY: 'scroll', }} > - - - - - - {selectedTab === LeftMenuTab.Navigator ? : null} - {selectedTab === LeftMenuTab.Project ? : null} - {selectedTab === LeftMenuTab.Github ? : null} + {when( + isMyProject, + + + + + , + )} + {when(selectedTab === LeftMenuTab.Navigator, )} + {when(isMyProject && selectedTab === LeftMenuTab.Project, )} + {when(isMyProject && selectedTab === LeftMenuTab.Github, )}