moonyeju
2023-11-15
[FIX] 모달창 수정 및, 파일 업로드 오류 수정
@481d681bd190c8b0fea87540932349fe900ed58f
--- src/component/Action.js
+++ src/component/Action.js
... | ... | @@ -86,29 +86,30 @@ |
86 | 86 |
if (node === null || fog !== 'fog') { |
87 | 87 |
throw 'no data'; |
88 | 88 |
} |
89 |
- onUploadFile(node); |
|
89 |
+ // onUploadFile(node); |
|
90 |
+ console.log('fog ' + fog + ' ' + isModalVisible); |
|
90 | 91 |
toggleModal(); |
91 | 92 |
// 분석 결과 node remove 요청 |
92 |
- return fetch(`${url}/trip/remove`, { |
|
93 |
- method: 'POST', |
|
94 |
- headers: { |
|
95 |
- 'Content-Type': 'application/json; charset=UTF-8', |
|
96 |
- }, |
|
97 |
- body: JSON.stringify({ |
|
98 |
- gps_x: node[0], |
|
99 |
- gps_y: node[1], |
|
100 |
- }), |
|
101 |
- }); |
|
93 |
+ // return fetch(`${url}/trip/remove`, { |
|
94 |
+ // method: 'POST', |
|
95 |
+ // headers: { |
|
96 |
+ // 'Content-Type': 'application/json; charset=UTF-8', |
|
97 |
+ // }, |
|
98 |
+ // body: JSON.stringify({ |
|
99 |
+ // gps_x: node[0], |
|
100 |
+ // gps_y: node[1], |
|
101 |
+ // }), |
|
102 |
+ // }); |
|
102 | 103 |
}) |
103 |
- .then(response => response.json()) |
|
104 |
- .then(data => { |
|
105 |
- console.log('remove data', data); |
|
106 |
- if (data.done === 'done') { |
|
107 |
- return; |
|
108 |
- } |
|
109 |
- }) |
|
104 |
+ // .then(response => response.json()) |
|
105 |
+ // .then(data => { |
|
106 |
+ // console.log('remove data', data); |
|
107 |
+ // if (data.done === 'done') { |
|
108 |
+ // return; |
|
109 |
+ // } |
|
110 |
+ // }) |
|
110 | 111 |
.catch(err => { |
111 |
- console.log(err); |
|
112 |
+ console.log('re ' + err); |
|
112 | 113 |
}); |
113 | 114 |
}; |
114 | 115 |
|
--- src/component/ModalComponent.js
+++ src/component/ModalComponent.js
... | ... | @@ -19,27 +19,38 @@ |
19 | 19 |
<Modal |
20 | 20 |
isVisible={isVisible} |
21 | 21 |
style={{ |
22 |
- position: 'absolute', |
|
23 |
- bottom: 40, |
|
24 |
- left: 0, |
|
25 | 22 |
width: '90%', |
26 |
- borderColor: RED, |
|
27 |
- borderWidth: 2, |
|
28 |
- borderRadius: 10, |
|
29 |
- overflow: 'hidden', |
|
23 |
+ justifyContent: 'center', |
|
24 |
+ alignItems: 'center', |
|
30 | 25 |
}} |
31 | 26 |
backdropOpacity={0}> |
32 | 27 |
<View |
33 | 28 |
style={{ |
29 |
+ borderColor: RED, |
|
30 |
+ borderWidth: 2, |
|
31 |
+ borderRadius: 10, |
|
34 | 32 |
backgroundColor: WHITE, |
35 | 33 |
padding: 22, |
36 | 34 |
borderRadius: 10, |
37 | 35 |
alignItems: 'center', |
38 | 36 |
justifyContent: 'center', |
39 | 37 |
}}> |
40 |
- <Text style={{color: RED, fontSize: 20}}>{alertTitle}</Text> |
|
41 |
- <Text style={{color: BLACK, fontSize: 15, marginTop: 5}}> |
|
42 |
- {alertMessage} 안전운행하세요. |
|
38 |
+ <Text |
|
39 |
+ style={{ |
|
40 |
+ color: RED, |
|
41 |
+ fontSize: 20, |
|
42 |
+ }}> |
|
43 |
+ {alertTitle} |
|
44 |
+ </Text> |
|
45 |
+ <Text |
|
46 |
+ style={{ |
|
47 |
+ color: BLACK, |
|
48 |
+ fontSize: 15, |
|
49 |
+ marginTop: 5, |
|
50 |
+ textAlign: 'center', |
|
51 |
+ }}> |
|
52 |
+ {alertMessage} |
|
53 |
+ {'\n'}안전운행하세요. |
|
43 | 54 |
</Text> |
44 | 55 |
</View> |
45 | 56 |
</Modal> |
--- src/component/Photo.js
+++ src/component/Photo.js
... | ... | @@ -97,28 +97,28 @@ |
97 | 97 |
if (node === null || fog !== 'fog') { |
98 | 98 |
throw 'no data'; |
99 | 99 |
} |
100 |
- onUploadFile(node); |
|
100 |
+ // onUploadFile(node); |
|
101 | 101 |
toggleModal(); |
102 | 102 |
|
103 | 103 |
// 분석 결과 node remove 요청 |
104 |
- return fetch(`${url}/trip/remove`, { |
|
105 |
- method: 'POST', |
|
106 |
- headers: { |
|
107 |
- 'Content-Type': 'application/json; charset=UTF-8', |
|
108 |
- }, |
|
109 |
- body: JSON.stringify({ |
|
110 |
- gps_x: node[0], |
|
111 |
- gps_y: node[1], |
|
112 |
- }), |
|
113 |
- }); |
|
104 |
+ // return fetch(`${url}/trip/remove`, { |
|
105 |
+ // method: 'POST', |
|
106 |
+ // headers: { |
|
107 |
+ // 'Content-Type': 'application/json; charset=UTF-8', |
|
108 |
+ // }, |
|
109 |
+ // body: JSON.stringify({ |
|
110 |
+ // gps_x: node[0], |
|
111 |
+ // gps_y: node[1], |
|
112 |
+ // }), |
|
113 |
+ // }); |
|
114 | 114 |
}) |
115 |
- .then(response => response.json()) |
|
116 |
- .then(data => { |
|
117 |
- console.log('remove data', data); |
|
118 |
- if (data.done === 'done') { |
|
119 |
- return; |
|
120 |
- } |
|
121 |
- }) |
|
115 |
+ // .then(response => response.json()) |
|
116 |
+ // .then(data => { |
|
117 |
+ // console.log('remove data', data); |
|
118 |
+ // if (data.done === 'done') { |
|
119 |
+ // return; |
|
120 |
+ // } |
|
121 |
+ // }) |
|
122 | 122 |
.catch(err => { |
123 | 123 |
console.log(err); |
124 | 124 |
}); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?