|
1 | 1 | import React, { Component } from 'react'; |
2 | 2 | import { connect } from 'react-redux'; |
3 | 3 | import { Grid, Row, Col } from 'react-bootstrap'; |
| 4 | +import { push } from 'redux-little-router'; |
4 | 5 | import SplitPane from 'react-split-pane'; |
5 | 6 | import Page from './Page'; |
6 | 7 | import Loader from '../components/Loader'; |
7 | 8 | import Breadcrumbs from '../components/Breadcrumbs'; |
8 | 9 | import Selector from '../components/Experiment/Selector'; |
9 | 10 | import Diff from '../components/Experiment/Diff'; |
10 | 11 | import Results from '../components/Review/Results'; |
11 | | -import { |
12 | | - getCurrentFilePair, |
13 | | - selectPair, |
14 | | - loadFilePair, |
15 | | -} from '../state/filePairs'; |
| 12 | +import { makeUrl } from '../state/routes'; |
| 13 | +import { getCurrentFilePair, loadFilePair } from '../state/filePairs'; |
16 | 14 | import { |
17 | 15 | getFeatures, |
18 | 16 | mostSimilar, |
@@ -160,7 +158,10 @@ const mapStateToProps = state => { |
160 | 158 |
|
161 | 159 | const experimentId = 1; |
162 | 160 | const mapDispatchToProps = dispatch => ({ |
163 | | - onSelect: pairId => dispatch(selectPair(experimentId, pairId)), |
| 161 | + onSelect: pairId => |
| 162 | + dispatch( |
| 163 | + push(makeUrl('reviewPair', { experiment: experimentId, pair: pairId })) |
| 164 | + ), |
164 | 165 | toggleInvisible: (expId, id) => { |
165 | 166 | dispatch(toggleInvisible()); |
166 | 167 | return dispatch(loadFilePair(expId, id)); |
|
0 commit comments