-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
41 lines (34 loc) · 1.08 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import "react-native-gesture-handler";
import "react-native-get-random-values";
import "react-native-url-polyfill/auto";
import * as encoding from "text-encoding";
import { enableLegacyWebImplementation } from "react-native-gesture-handler";
import React from "react";
import MainProvider from "src/Providers/MainProvider";
import MainNavigator from "src/navigation/MainNavigator";
import SuspenseProvider from "src/Providers/SuspenseProvider";
global.Buffer = global.Buffer || require("safe-buffer").Buffer;
Object.assign(global, {
TextEncoder: encoding.TextEncoder,
TextDecoder: encoding.TextDecoder,
});
if (typeof btoa === "undefined") {
global.btoa = function (str) {
return Buffer.from(str, "binary").toString("base64");
};
}
if (typeof atob === "undefined") {
global.atob = function (b64Encoded) {
return Buffer.from(b64Encoded, "base64").toString("binary");
};
}
enableLegacyWebImplementation(true);
export default function App() {
return (
<MainProvider>
<SuspenseProvider>
<MainNavigator />
</SuspenseProvider>
</MainProvider>
);
}