File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const App = (): JSX.Element => {
2626 if ( window . localStorage . getItem ( 'ssid' ) !== 'guest' ) {
2727 dispatch ( toggleLoggedIn ( true ) ) ;
2828 }
29- setToggleAttempt ( ! toggleAttempt ) ;
29+ // setToggleAttempt(!toggleAttempt);
3030 } , [ ] ) ;
3131
3232 // following useEffect runs on first mount
@@ -61,7 +61,7 @@ export const App = (): JSX.Element => {
6161 }
6262 } ) ;
6363 }
64- } , [ toggleAttempt ] ) ;
64+ } , [ ] ) ;
6565 // useEffect(() => {
6666 // // provide config properties to legacy projects so new edits can be auto saved
6767 // // if (state.config === undefined) {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const dispatch = useDispatch();
3434 // If errors occur on the backend, the project name still gets updated
3535
3636 dispatch ( updateProjectName ( projectName ) )
37- saveProject ( projectName , state ) ;
37+ saveProject ( projectName , state ) . then ( ( project ) => { console . log ( project ) } )
3838 setOpen ( false ) ;
3939 } else {
4040 setInvalidProjectName ( true ) ;
Original file line number Diff line number Diff line change @@ -48,10 +48,10 @@ export const saveProject = (
4848 } )
4949 . then ( ( res ) => res . json ( ) )
5050 . then ( ( data ) => {
51- return data . project ;
51+ return { _id : data . _id , ... data . project } ;
5252 } )
5353 . catch ( ( err ) => console . log ( `Error saving project ${ err } ` ) ) ;
54- return project ;
54+ return project ; //returns _id in addition to the project object from the document
5555} ;
5656
5757export const deleteProject = ( project : any ) : Promise < Object > => {
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const marketplaceController: MarketplaceController = {
5252 }
5353 } ) ;
5454 }
55- res . locals . publishedProject = result ;
55+ res . locals . publishedProject = result ; //returns the entire document
5656 return next ( ) ;
5757 }
5858 ) ;
You can’t perform that action at this time.
0 commit comments