Connected creation form with redux, and created reducer for short URL creation

This commit is contained in:
Alejandro Celaya
2018-07-28 10:41:05 +02:00
parent c51bf5b9a0
commit 0a5c20e3ee
13 changed files with 116 additions and 48 deletions

View File

@@ -5,6 +5,7 @@ import { selectServer } from '../servers/reducers/selectedServer';
import CreateShortUrl from '../short-urls/CreateShortUrl';
import ShortUrls from '../short-urls/ShortUrls';
import AsideMenu from './AsideMenu';
import { pick } from 'ramda';
export class MenuLayout extends React.Component {
componentDidMount() {
@@ -35,7 +36,4 @@ export class MenuLayout extends React.Component {
}
}
export default connect(state => ({
selectedServer: state.selectedServer,
shortUrlsListParams: state.shortUrlsListParams,
}), { selectServer })(MenuLayout);
export default connect(pick(['selectedServer', 'shortUrlsListParams']), { selectServer })(MenuLayout);