import React from 'react'; import { connect } from 'react-redux'; import { useHistory } from 'react-router'; import { Navbar, NavbarGroup, NavbarDivider, Button, Classes, Tooltip, Position, } from '@blueprintjs/core'; import { FormattedMessage as T } from 'react-intl'; import DashboardTopbarUser from 'components/Dashboard/TopbarUser'; import DashboardBreadcrumbs from 'components/Dashboard/DashboardBreadcrumbs'; import { Icon, If } from 'components'; import withSearch from 'containers/GeneralSearch/withSearch'; import withDashboardActions from 'containers/Dashboard/withDashboardActions'; import withDashboard from 'containers/Dashboard/withDashboard'; import { compose } from 'utils'; function DashboardTopbar({ // #withDashboard pageTitle, pageSubtitle, editViewId, // #withDashboardActions toggleSidebarExpend, // #withGlobalSearch openGlobalSearch, }) { const history = useHistory(); const handlerClickEditView = () => { history.push(`/custom_views/${editViewId}/edit`); }; const handleSidebarToggleBtn = () => { toggleSidebarExpend(); }; return (
); } export default compose( withSearch, withDashboard(({ pageTitle, pageSubtitle, editViewId }) => ({ pageTitle, pageSubtitle, editViewId, })), withDashboardActions, )(DashboardTopbar);