Skip to content

Commit 1c8dcc3

Browse files
author
Alexandra Janin
committed
Fix index talk
1 parent fcc866a commit 1c8dcc3

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

src/actions/Notes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const vote = (name, note) => (dispatch, getState) => {
4141
const state = getState();
4242
const nameArray = Object.keys(state.notes[state.selectedTalk]);
4343
const column = findColumnLetter(name, nameArray);
44-
const row = state.selectedTalk + 1; // sheet values start at 2;
44+
const row = state.selectedTalk + 2; // sheet values start at 2;
4545
console.log(`${name} give a ${note} to ${state.selectedTalk}`);
4646

4747
dispatch({

src/actions/Talks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ export const loadTalks = () => dispatch => {
3636

3737
export const selectTalk = id => ({
3838
type: 'SELECT_TALK',
39-
talk: id
39+
index: id - 1
4040
});

src/components/App.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ class AppView extends Component {
119119
toggleDrawer = () => this.setState({drawerIsOpen: !this.state.drawerIsOpen});
120120

121121
render() {
122-
console.log(this.props.filteredTalks)
123-
124122
return (
125123
<MuiThemeProvider>
126124
<div className="container">

src/components/Notes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class NotesView extends Component {
130130
const mapStateToProps = state => {
131131
const notes = state.notes[state.selectedTalk];
132132
const myData = getMyData(notes, state.profile.name);
133+
console.log('myData', myData)
133134
const myNote = myData.note !== undefined ? Math.round(myData.note) : 0;
134135
let othersNote = {...notes};
135136
delete othersNote[myData.name];

src/reducers/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const rootReducer = (state = defaultState, action) => {
9595
case SELECT_TALK:
9696
return {
9797
...state,
98-
selectedTalk: action.talk
98+
selectedTalk: action.index
9999
}
100100

101101
case SIGN_OUT:

0 commit comments

Comments
 (0)