Jump to dashboard shortcut

This commit is contained in:
Jori Lallo
2016-07-23 13:12:56 -07:00
parent b48502cdd2
commit 4c37fb0168

View File

@@ -3,6 +3,7 @@ import { browserHistory, Link } from 'react-router';
import Helmet from 'react-helmet';
import { observer } from 'mobx-react';
import keydown from 'react-keydown';
import _ from 'lodash';
import DropdownMenu, { MenuItem } from 'components/DropdownMenu';
import Flex from 'components/Flex';
@@ -32,10 +33,13 @@ class Layout extends React.Component {
@keydown(['/', 't'])
search() {
// if (!this.props.search) return;
_.defer(() => browserHistory.push('/search'));
}
setTimeout(() => {
browserHistory.push('/search');
}, 0);
@keydown(['d'])
dashboard() {
// if (!this.props.search) return;
_.defer(() => browserHistory.push('/'));
}
render() {