@@ -154,12 +154,9 @@ const Editor = () => {
154154 fetch ( url , { method : 'GET' } )
155155 . then ( response => response . json ( ) )
156156 . then ( data => {
157- console . log ( `customPath before status: ${ myProfile . customPath } ` ) ;
158- console . log ( myProfile ) ;
159157 myProfile . published = ( data . page_is_published === "yes" ) ;
160158 myProfile . hasPassword = ( data . password_required === "yes" ) ;
161159 myProfile . customPath = String ( data . customurl ) ;
162- console . log ( `customPath from status: ${ myProfile . customPath } ` ) ;
163160 myProfile . save ( ) ;
164161 } ) . then ( ( ) => {
165162 setPlsRender ( prev => ! prev ) ;
@@ -424,7 +421,7 @@ const Editor = () => {
424421
425422 if ( response . status === 200 ) {
426423 alert ( "Your custom URL has been deleted!" ) ;
427- myProfile . customPath = null ;
424+ myProfile . customPath = ' null' ;
428425 await myProfile . save ( ) ;
429426 setPlsRender ( prev => ! prev ) ;
430427 } else {
@@ -611,11 +608,11 @@ const Editor = () => {
611608 </ div >
612609 }
613610 < DropdownItem divider tag = "li" />
614- { myProfile && ! myProfile . hasCustomPath &&
611+ { myProfile && ( myProfile . customPath == 'null' ) &&
615612 < NavLink tag = "li" >
616613 < DropdownItem className = "nav-item" onClick = { addCustomURL } style = { { color : "black" } } > Customize URL</ DropdownItem >
617614 </ NavLink >
618- } { myProfile && myProfile . hasCustomPath &&
615+ } { myProfile && ( myProfile . customPath != 'null' ) &&
619616 < div >
620617 < NavLink tag = "li" >
621618 < DropdownItem className = "nav-item" onClick = { addCustomURL } style = { { color : "black" } } > Edit Custom URL</ DropdownItem >
0 commit comments