Skip to content

Commit f200294

Browse files
author
root
committed
clean thunk code emotion
1 parent 5d90164 commit f200294

4 files changed

Lines changed: 1 addition & 32 deletions

File tree

src/Reducer/RootReducer.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ const initialState = {
22
questions: []
33
};
44

5-
<<<<<<< HEAD
6-
=======
7-
/*type: 'EDIT_QUESTIONS',
8-
payload_id: id,
9-
payload: data*/
10-
11-
>>>>>>> 1cafc2cb72a8877cd935a88d31d567664bdc9a8c
125
const RootReducer = (state = initialState, action) => {
136
switch (action.type) {
147
case 'ADD_QUESTIONS':

src/actionCreators/EditQuestion.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,4 @@ export const editQuestions = (id, data) => {
44
payload_id: id,
55
payload: data
66
}
7-
<<<<<<< HEAD
87
}
9-
=======
10-
}
11-
12-
13-
/*case 'EDIT_QUESTIONS':
14-
let newStateQuestion = action.payload;
15-
state.questions[action.id - 1].content = newStateQuestion;
16-
return {
17-
...state,
18-
questions: state.questions
19-
}*/
20-
>>>>>>> 1cafc2cb72a8877cd935a88d31d567664bdc9a8c

src/components/EditQuestion.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
import React, { useState } from 'react';
22
import { useDispatch } from 'react-redux';
3-
<<<<<<< HEAD
4-
=======
5-
// import { addQuestions } from '../actionCreators/AddQuestion';
6-
>>>>>>> 1cafc2cb72a8877cd935a88d31d567664bdc9a8c
3+
74
import { editQuestions } from '../actionCreators/EditQuestion';
85
import { formWrapper, inputWrapper } from '../css/GlobalCss';
96

107
const EditQuestion = (props) => {
118
const [enteredValue, setOutputValue] = useState('');
129
const dispatch = useDispatch();
1310
const { button_id, button_content } = props.location;
14-
<<<<<<< HEAD
15-
=======
16-
// const questionList = useSelector(state => state.questions);
17-
>>>>>>> 1cafc2cb72a8877cd935a88d31d567664bdc9a8c
1811
const handleEdit = (enteredText) => {
1912
setOutputValue(enteredText.target.value);
2013
}

src/components/QuestionBox.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import React, { useEffect, useState } from 'react';
22
import AddThunkQuestion from '../actionCreators/AddThunkQuestion';
33
import { useSelector, useDispatch } from 'react-redux';
4-
<<<<<<< HEAD
5-
=======
6-
// import { css } from 'emotion';
7-
>>>>>>> 1cafc2cb72a8877cd935a88d31d567664bdc9a8c
84
import { questionWrapper, containerWrapper, buttonWrapper } from '../css/GlobalCss';
95

106
const QuestionBox = () => {

0 commit comments

Comments
 (0)