File tree 3 files changed +1644
-2121
lines changed
3 files changed +1644
-2121
lines changed Original file line number Diff line number Diff line change 1
- module . exports . baseURL = "http://192.168.3.18:3000" ;
2
- // module.exports.baseURL = "http://172.20.10.6:3000";
1
+ module . exports . baseURL = "http://192.168.1.22:3000"
Original file line number Diff line number Diff line change 1
1
import {
2
2
ActivityIndicator ,
3
+ Alert ,
3
4
Keyboard ,
4
5
Modal ,
5
6
ScrollView ,
@@ -58,9 +59,16 @@ const NewTaskScreen = ({ setModalVisible }) => {
58
59
const timeZone = Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ;
59
60
60
61
console . log ( "formData" , formData ) ;
61
- if ( title === "" ) alert ( "Please add title" ) ;
62
- // else if (description === "") alert("Please add description");
63
- else if ( taskDate === "" ) alert ( "Please choose date" ) ;
62
+ if ( title . trim ( ) . length === 0 ) {
63
+ Alert . alert ( "Please add title" ) ;
64
+ return ;
65
+ } else if ( description . trim ( ) . length === 0 ) {
66
+ Alert . alert ( "Please add description" ) ;
67
+ return ;
68
+ } else if ( taskDate . trim ( ) . length === 0 ) {
69
+ Alert . alert ( "Please choose date" ) ;
70
+ return ;
71
+ }
64
72
else {
65
73
setLoading ( true ) ;
66
74
const newSavedTask = await tasksAPI . createTask (
You can’t perform that action at this time.
0 commit comments