From b94107c4b1a2ebec57db21db5211b3447c94ab46 Mon Sep 17 00:00:00 2001 From: catarak Date: Mon, 20 Jun 2016 18:05:04 -0400 Subject: [PATCH] fix merge conflict bugs --- shared/redux/actions/index.js | 59 ----------------------------- shared/redux/actions/project.js | 2 +- styles/abstracts/_placeholders.scss | 6 +-- 3 files changed, 2 insertions(+), 65 deletions(-) diff --git a/shared/redux/actions/index.js b/shared/redux/actions/index.js index 2a924bc4..1f484f65 100644 --- a/shared/redux/actions/index.js +++ b/shared/redux/actions/index.js @@ -44,62 +44,3 @@ export function decreaseFont() { type: ActionTypes.DECREASE_FONTSIZE } } - -export function saveProject() { - return function(dispatch, getState) { - var state = getState(); - var formParams = Object.assign({}, state.project); - formParams.file = state.file; - if (state.id) { - axios.put(`${ROOT_URL}/projects/${state.id}`, formParams, {withCredentials: true}) - .then(response => { - dispatch({ - type: ActionTYpes.PROJECT_SAVE_SUCCESS - }) - .catch(response => dispatch({ - type: ActionTypes.PROJECT_SAVE_FAIL - })); - }) - } - else { - axios.post(`${ROOT_URL}/projects`, formParams, {withCredentials: true}) - .then(response => { - browserHistory.push('/' + response.data.id); - dispatch({ - type: ActionTypes.NEW_PROJECT, - name: response.data.name, - id: response.data.id, - file: { - name: response.data.file.name, - content: response.data.file.content - } - }); - }) - .catch(response => dispatch({ - type: ActionTypes.PROJECT_SAVE_FAIL - })); - } - } -} - - -export function createProject() { - return function(dispatch) { - axios.post(`${ROOT_URL}/projects`, {}, {withCredentials: true}) - .then(response => { - dispatch({ - type: ActionTypes.NEW_PROJECT, - name: response.data.name, - id: response.data.id, - file: { - name: response.data.file.name, - content: response.data.file.content - } - }); - browserHistory.push('/' + response.data.id); - }) - .catch(response => dispatch({ - type: ActionTypes.PROJECT_SAVE_FAIL - })); - } -} diff --git a/shared/redux/actions/project.js b/shared/redux/actions/project.js index 6636b017..85715980 100644 --- a/shared/redux/actions/project.js +++ b/shared/redux/actions/project.js @@ -46,7 +46,7 @@ export function saveProject() { axios.put(`${ROOT_URL}/projects/${state.id}`, formParams, {withCredentials: true}) .then(response => { dispatch({ - type: ActionTYpes.PROJECT_SAVE_SUCCESS + type: ActionTypes.PROJECT_SAVE_SUCCESS }) .catch(response => dispatch({ type: ActionTypes.PROJECT_SAVE_FAIL diff --git a/styles/abstracts/_placeholders.scss b/styles/abstracts/_placeholders.scss index c05012d1..ba17a87f 100644 --- a/styles/abstracts/_placeholders.scss +++ b/styles/abstracts/_placeholders.scss @@ -1,4 +1,4 @@ -%button { +%toolbar-button { display: inline-block; height: #{44 / $base-font-size}rem; width: #{44 / $base-font-size}rem; @@ -8,10 +8,6 @@ cursor: pointer; border: none; outline: none; -} - -%toolbar-button { - @extend %button; background-color: $light-button-background-color; color: $light-button-color; & g {