From 286b581ef2eb7f75d181fd636e3a19cff21d79cb Mon Sep 17 00:00:00 2001 From: Heiniusw Date: Mon, 16 Sep 2024 08:13:19 +0200 Subject: [PATCH] btoa fix --- App.tsx | 9 --------- Interface.tsx | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/App.tsx b/App.tsx index a3e4b42..43fcbd3 100644 --- a/App.tsx +++ b/App.tsx @@ -8,15 +8,6 @@ import ErrorBoundary from 'react-native-error-boundary'; import { ToastProvider } from './common/ToastProvider'; import { Toast } from './common/Toast'; 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 = () => { // https://medium.com/@jimmyalbert/handle-errors-in-react-native-897713baf166 diff --git a/Interface.tsx b/Interface.tsx index c04d1a5..556dd9c 100644 --- a/Interface.tsx +++ b/Interface.tsx @@ -6,6 +6,7 @@ import Settings from './screens/Settings'; import { ThemeButton, ThemeText } from './common/ThemeTypes'; import { StyleSheet, Text, View } from 'react-native'; import { useColors } from './common/colors'; +import {decode as atob, encode as btoa} from 'base-64' let errorObject; export const InterfaceContext = createContext(null);