Skip to content

Commit

Permalink
fix Can't find variable Intl #62 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanhuiyang authored Jan 15, 2020
1 parent c3a3d46 commit c574445
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Need manually add Intl polyfill for react-native app
import "intl";
(Intl as any).__disableRegExpRestore();

import "intl/locale-data/jsonp/en";
import "intl/locale-data/jsonp/zh";

import React from "react";
import { Root } from "native-base";
import { NativeRouter } from "react-router-native";
Expand All @@ -15,10 +22,6 @@ import { setHostUrl } from "./core/src/shared/fetch";
import { HOST_URL_DEV, HOST_URL_PROD } from "./core/src/models/HostUrl";
import * as Localization from "expo-localization";

// You should manually add Intl polyfill for react-native app
import "intl";
import "intl/locale-data/jsonp/en";
import "intl/locale-data/jsonp/zh";
import { SET_LOCALE } from "./core/src/actions/common";

interface Props {}
Expand Down

0 comments on commit c574445

Please sign in to comment.