1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-08 07:05:15 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

chore: rename onPushyEvents

This commit is contained in:
sunnylqm
2023-10-28 18:28:23 +08:00
parent 23346a5f1d
commit d111bf5a9c
3 changed files with 6 additions and 6 deletions

View File

@@ -16,20 +16,20 @@ import {
switchVersionLater,
markSuccess,
downloadAndInstallApk,
onEvents,
onPushyEvents,
} from './main';
import { UpdateEventsListener } from './type';
export function simpleUpdate(
WrappedComponent: ComponentType,
options: { appKey?: string; onEvents?: UpdateEventsListener } = {},
options: { appKey?: string; onPushyEvents?: UpdateEventsListener } = {},
) {
const { appKey, onEvents: eventListeners } = options;
const { appKey, onPushyEvents: eventListeners } = options;
if (!appKey) {
throw new Error('appKey is required for simpleUpdate()');
}
if (typeof eventListeners === 'function') {
onEvents(eventListeners);
onPushyEvents(eventListeners);
}
return __DEV__
? WrappedComponent