fix #269
This commit is contained in:
parent
0a4f56db32
commit
cb2d8d0dd5
2 changed files with 2 additions and 1 deletions
|
@ -40,7 +40,7 @@ function Nav(props) {
|
|||
}
|
||||
})()}
|
||||
{(() => { // eslint-disable-line
|
||||
if (props.project.id) {
|
||||
if (props.project.id && props.user.authenticated) {
|
||||
return (
|
||||
<li className="nav__item">
|
||||
<a className="nav__clone" onClick={props.cloneProject}>
|
||||
|
|
|
@ -151,6 +151,7 @@ export function newProject() {
|
|||
|
||||
export function cloneProject() {
|
||||
return (dispatch, getState) => {
|
||||
dispatch(setUnsavedChanges(false));
|
||||
const state = getState();
|
||||
const formParams = Object.assign({}, { name: `${state.project.name} copy` }, { files: state.files });
|
||||
axios.post(`${ROOT_URL}/projects`, formParams, { withCredentials: true })
|
||||
|
|
Loading…
Reference in a new issue