diff --git a/src/lib/alert-messages/constants.ts b/src/lib/alert-messages/constants.ts index 7cca47a..02e5d94 100644 --- a/src/lib/alert-messages/constants.ts +++ b/src/lib/alert-messages/constants.ts @@ -1,4 +1,15 @@ -export const CAMERA_PERMISSION_DENIED = { +interface PermissionMessage { + android: { + title: string; + message: string; + }; + ios: { + title: string; + message: string; + }; +} + +export const CAMERA_PERMISSION_DENIED: PermissionMessage = { android: { title: "In order to use the camera, you need to grant app permissions.", message: "Please go to Railbird > App Info and grant permissions. ", diff --git a/src/lib/alert-messages/index.ts b/src/lib/alert-messages/index.ts index 3de5bd0..4c76604 100644 --- a/src/lib/alert-messages/index.ts +++ b/src/lib/alert-messages/index.ts @@ -7,10 +7,6 @@ const ALERT_TYPE = { export const showAlert = (alertType: string) => { const alert = ALERT_TYPE[alertType]; - if (!alert) { - console.error("No alert matches this alert type:", alertType); - return; - } const { title, message } = alert[Platform.OS]; Alert.alert(title, message); };