actions.ts 313 B

123456789101112
  1. import { ThunkResult } from 'app/types';
  2. import { AnalyticsTab } from '../../types';
  3. import { setDrawerOpen, setDrawerTab } from './reducers';
  4. export function openDrawer(tab: AnalyticsTab): ThunkResult<void> {
  5. return (dispatch) => {
  6. dispatch(setDrawerOpen(true));
  7. dispatch(setDrawerTab(tab));
  8. };
  9. }