| 38 | * @returns Uint8Array data |
| 39 | */ |
| 40 | export const base64ToUint8Array = (base64: string): Uint8Array => { |
| 41 | if (typeof atob !== 'function' || !isWeb()) { |
| 42 | throw new Error('atob is not available in this environment.'); |
| 43 | } |
| 44 | |
| 45 | const binaryString = atob(base64); |
| 46 | // oxlint-disable-next-line typescript-eslint(no-misused-spread) |
| 47 | return new Uint8Array([...binaryString].map(char => char.charCodeAt(0))); |
| 48 | }; |
| 49 | |
| 50 | export const feedbackAlertDialog = (title: string, message: string): void => { |
| 51 | if (isWeb() && typeof RN_GLOBAL_OBJ.alert !== 'undefined') { |