File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ function MainPage(props) {
30
30
const [ address , setAddress ] = useState ( localStorage . getItem ( "currentDong" ) ) ;
31
31
32
32
useEffect ( ( ) => {
33
+ if ( address == null ) {
34
+ setAddress ( "" ) ;
35
+ }
33
36
if ( address != null ) {
34
37
axios . post ( `http://localhost:8080/save/current/address/${ islogedId } ` , { address} )
35
38
. then ( ( response ) => {
@@ -68,6 +71,9 @@ function MainPage(props) {
68
71
} ;
69
72
70
73
useEffect ( ( ) => {
74
+ if ( address == null ) {
75
+ setAddress ( "" ) ;
76
+ }
71
77
fetchPost ( ) ;
72
78
} , [ history . action ] ) ;
73
79
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ export default function WritePage(props) {
19
19
// 주소 인증
20
20
const [ currentAddr , setCurrentAddr ] = useState ( localStorage . getItem ( "currentDong" ) ) ;
21
21
useEffect ( ( ) => {
22
+ if ( currentAddr == null ) {
23
+ setCurrentAddr ( "" ) ;
24
+ }
22
25
axios . get ( `http://localhost:8080/address/certification/${ islogedId } /${ currentAddr } ` )
23
26
. then ( ( response ) => {
24
27
console . log ( response . data )
You can’t perform that action at this time.
0 commit comments