// @flow import * as React from 'react'; import { observer, inject } from 'mobx-react'; import { DocumentIcon, ProfileIcon, SettingsIcon, CodeIcon, UserIcon, LinkIcon, TeamIcon, } from 'outline-icons'; import Flex from 'shared/components/Flex'; import Sidebar, { Section } from './Sidebar'; import Scrollable from 'components/Scrollable'; import Header from './components/Header'; import SidebarLink from './components/SidebarLink'; import HeaderBlock from './components/HeaderBlock'; import AuthStore from 'stores/AuthStore'; type Props = { history: Object, auth: AuthStore, }; @observer class SettingsSidebar extends React.Component { returnToDashboard = () => { this.props.history.push('/'); }; render() { const { team, user } = this.props.auth; if (!team || !user) return; return (
Account
}> Profile }> API Tokens
Team
{user.isAdmin && ( }> Details )} }> People }> Share Links {user.isAdmin && ( } > Integrations )} {user.isAdmin && ( }> Export Data )}
); } } export default inject('auth')(SettingsSidebar);