diff options
author | Ivan Chen <ivan@thetaggid.com> | 2021-01-15 19:27:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 19:27:03 -0500 |
commit | 1803da7388902db45ad37fbac509604ae632bdb5 (patch) | |
tree | a786919f9bc42f7797367d55ed8f1e099134f368 /src/services/ReportingService.ts | |
parent | 4d9efafeb4243e20e1fc936c27b9055c7ec82f8a (diff) | |
parent | cc52dabaaf529763e9c1c4683ba94ed55c5671a8 (diff) |
Merge pull request #176 from IvanIFChen/tma498-update-error-strings
[TMA-498] Update Error Strings
Diffstat (limited to 'src/services/ReportingService.ts')
-rw-r--r-- | src/services/ReportingService.ts | 10 |
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', |