This commit is contained in:
Cassie Tarakajian 2017-01-17 13:20:42 -05:00
parent 0a4f56db32
commit cb2d8d0dd5
2 changed files with 2 additions and 1 deletions

View file

@ -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}>

View file

@ -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 })