btoa fix
This commit is contained in:
9
App.tsx
9
App.tsx
@@ -8,15 +8,6 @@ import ErrorBoundary from 'react-native-error-boundary';
|
|||||||
import { ToastProvider } from './common/ToastProvider';
|
import { ToastProvider } from './common/ToastProvider';
|
||||||
import { Toast } from './common/Toast';
|
import { Toast } from './common/Toast';
|
||||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||||
import {decode, encode} from 'base-64'
|
|
||||||
|
|
||||||
if (!global.btoa) {
|
|
||||||
global.btoa = encode;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!global.atob) {
|
|
||||||
global.atob = decode;
|
|
||||||
}
|
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
// https://medium.com/@jimmyalbert/handle-errors-in-react-native-897713baf166
|
// https://medium.com/@jimmyalbert/handle-errors-in-react-native-897713baf166
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import Settings from './screens/Settings';
|
|||||||
import { ThemeButton, ThemeText } from './common/ThemeTypes';
|
import { ThemeButton, ThemeText } from './common/ThemeTypes';
|
||||||
import { StyleSheet, Text, View } from 'react-native';
|
import { StyleSheet, Text, View } from 'react-native';
|
||||||
import { useColors } from './common/colors';
|
import { useColors } from './common/colors';
|
||||||
|
import {decode as atob, encode as btoa} from 'base-64'
|
||||||
|
|
||||||
let errorObject;
|
let errorObject;
|
||||||
export const InterfaceContext = createContext<any>(null);
|
export const InterfaceContext = createContext<any>(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user