mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 12:11:39 +08:00
Remove update.json import in simpleUpdate
This commit is contained in:
@@ -12,10 +12,11 @@ import {
|
||||
downloadAndInstallApk,
|
||||
} from './main';
|
||||
|
||||
import _updateConfig from '../../../update.json';
|
||||
const { appKey } = _updateConfig[Platform.OS];
|
||||
|
||||
export function simpleUpdate(WrappedComponent) {
|
||||
export function simpleUpdate(WrappedComponent, options = {}) {
|
||||
const { appKey } = options;
|
||||
if (!appKey) {
|
||||
throw new Error('appKey is required for simpleUpdate()');
|
||||
}
|
||||
return __DEV__
|
||||
? WrappedComponent
|
||||
: class AppUpdate extends Component {
|
||||
|
Reference in New Issue
Block a user