aboutsummaryrefslogtreecommitdiff
path: root/src/services/ReportingService.ts
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-01-11 16:11:11 -0500
committerIvan Chen <ivan@tagg.id>2021-01-15 14:19:50 -0500
commit080e76350c2570eeb096fad40fe95f1b766b4539 (patch)
treebcb9f73f2c192f8c34f2064a5c3fd003756c2823 /src/services/ReportingService.ts
parent1dccfb1d3e9470d81de8d1ec0a0dbb3803372f7d (diff)
created strings.ts and linting
Diffstat (limited to 'src/services/ReportingService.ts')
-rw-r--r--src/services/ReportingService.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/services/ReportingService.ts b/src/services/ReportingService.ts
index 1563d086..8c0a4bfb 100644
--- a/src/services/ReportingService.ts
+++ b/src/services/ReportingService.ts
@@ -3,6 +3,10 @@
import {REPORT_ISSUE_ENDPOINT} from '../constants';
import {Alert} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
+import {
+ ERROR_SOMETHING_WENT_WRONG,
+ MARKED_AS_MSG,
+} from '../constants/strings';
export const sendReport = async (
moment_id: string,
@@ -25,15 +29,15 @@ export const sendReport = async (
let statusCode = response.status;
if (statusCode === 200) {
- Alert.alert('Marked as ' + message.split(' ')[2]);
+ Alert.alert(MARKED_AS_MSG(message.split(' ')[2]));
} else {
- Alert.alert('Something went wrong!', 'Please try again.');
+ Alert.alert(ERROR_SOMETHING_WENT_WRONG);
}
if (callback) {
callback();
}
} catch (error) {
- Alert.alert('Something went wrong!', 'Please try again.');
+ Alert.alert(ERROR_SOMETHING_WENT_WRONG);
console.log(
'Something went wrong! 😭',
'Unable able to retrieve data',