Add the word "copy" to sketch name after duplicating (#176)
* starting to work on clone project * adds the word *copy* to sketches that have been dupicated
This commit is contained in:
parent
3a8e67d484
commit
93f871e857
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ export function newProject() {
|
||||||
export function cloneProject() {
|
export function cloneProject() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const formParams = Object.assign({}, { name: state.project.name }, { files: state.files });
|
const formParams = Object.assign({}, { name: `${state.project.name} copy` }, { files: state.files });
|
||||||
axios.post(`${ROOT_URL}/projects`, formParams, { withCredentials: true })
|
axios.post(`${ROOT_URL}/projects`, formParams, { withCredentials: true })
|
||||||
.then(response => {
|
.then(response => {
|
||||||
browserHistory.push(`/projects/${response.data.id}`);
|
browserHistory.push(`/projects/${response.data.id}`);
|
||||||
|
|
Loading…
Reference in a new issue