diff options
| author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2021-01-16 09:51:36 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-16 09:51:36 -0800 |
| commit | 9711093bfa5810868e3cd17008bb7b3ddc7b9034 (patch) | |
| tree | 6a8bb4341b1623cfc2da86af4b3b28c1fd3f8a44 /src/services/ReportingService.ts | |
| parent | d85eaeb878cbbeedda860ee5809b81100c910af2 (diff) | |
| parent | 30391867438bb28cbcba9fc9ee2ff6d00027fd86 (diff) | |
Merge branch 'master' into tma538-friend-requests
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', |
