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 => {
26
26
if ( window . localStorage . getItem ( 'ssid' ) !== 'guest' ) {
27
27
dispatch ( toggleLoggedIn ( true ) ) ;
28
28
}
29
- setToggleAttempt ( ! toggleAttempt ) ;
29
+ // setToggleAttempt(!toggleAttempt);
30
30
} , [ ] ) ;
31
31
32
32
// following useEffect runs on first mount
@@ -61,7 +61,7 @@ export const App = (): JSX.Element => {
61
61
}
62
62
} ) ;
63
63
}
64
- } , [ toggleAttempt ] ) ;
64
+ } , [ ] ) ;
65
65
// useEffect(() => {
66
66
// // provide config properties to legacy projects so new edits can be auto saved
67
67
// // if (state.config === undefined) {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const dispatch = useDispatch();
34
34
// If errors occur on the backend, the project name still gets updated
35
35
36
36
dispatch ( updateProjectName ( projectName ) )
37
- saveProject ( projectName , state ) ;
37
+ saveProject ( projectName , state ) . then ( ( project ) => { console . log ( project ) } )
38
38
setOpen ( false ) ;
39
39
} else {
40
40
setInvalidProjectName ( true ) ;
Original file line number Diff line number Diff line change @@ -48,10 +48,10 @@ export const saveProject = (
48
48
} )
49
49
. then ( ( res ) => res . json ( ) )
50
50
. then ( ( data ) => {
51
- return data . project ;
51
+ return { _id : data . _id , ... data . project } ;
52
52
} )
53
53
. 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
55
55
} ;
56
56
57
57
export const deleteProject = ( project : any ) : Promise < Object > => {
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const marketplaceController: MarketplaceController = {
52
52
}
53
53
} ) ;
54
54
}
55
- res . locals . publishedProject = result ;
55
+ res . locals . publishedProject = result ; //returns the entire document
56
56
return next ( ) ;
57
57
}
58
58
) ;
You can’t perform that action at this time.
0 commit comments