diff options
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', |