|
@@ -19,6 +19,7 @@ const Sandbox =()=>{
|
|
|
let user = useSelector(state => state.user.currentUser.id)
|
|
|
let email = useSelector(state => state.user.currentUser.email)
|
|
|
let codeHTML ,codeCSS , codeJS ,title
|
|
|
+ const isAuth = useSelector(state => state.user.isAuth)
|
|
|
|
|
|
const htmlCodeGenerator=(codeHtml)=>{
|
|
|
const htmlOutput = document.getElementById("htmlOutput")
|
|
@@ -46,7 +47,7 @@ const Sandbox =()=>{
|
|
|
<fieldset className="title">
|
|
|
<legend>Title</legend>
|
|
|
<textarea onChange={txt => title=txt.target.value} className="nameProj" name="title"></textarea>
|
|
|
- <button className='saveProject' type='button' onClick={()=> saveProject(title,codeHTML,codeCSS,codeJS,user,email)}>Save new project</button>
|
|
|
+ { isAuth&&<button className='saveProject' type='button' onClick={()=> saveProject(title,codeHTML,codeCSS,codeJS,user,email)}>Save new project</button>}
|
|
|
</fieldset>
|
|
|
<form className="ide">
|
|
|
<fieldset className="dev">
|