mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 10:21:37 +08:00
add cresc
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update",
|
||||
"version": "10.23.1",
|
||||
"version": "10.24.0",
|
||||
"description": "react-native hot update",
|
||||
"main": "src/index",
|
||||
"scripts": {
|
||||
@@ -74,6 +74,5 @@
|
||||
"react-native": "0.73",
|
||||
"ts-jest": "^29.2.5",
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
|
||||
}
|
||||
}
|
||||
|
@@ -41,6 +41,8 @@ export const UpdateContext = createContext<{
|
||||
lastError?: Error;
|
||||
}>(defaultContext);
|
||||
|
||||
export const usePushy = () => useContext(UpdateContext);
|
||||
export const useUpdate = () => useContext(UpdateContext);
|
||||
|
||||
export const useCresc = () => useContext(UpdateContext);
|
||||
export const usePushy = useUpdate;
|
||||
|
||||
export const useCresc = useUpdate;
|
||||
|
@@ -15,7 +15,7 @@ import {
|
||||
import { Pushy, Cresc } from './client';
|
||||
import { currentVersion, packageVersion, getCurrentVersionInfo } from './core';
|
||||
import { CheckResult, ProgressData, UpdateTestPayload } from './type';
|
||||
import { ClientContext } from './context';
|
||||
import { UpdateContext } from './context';
|
||||
import { URL } from 'react-native-url-polyfill';
|
||||
import { isInRollout } from './isInRollout';
|
||||
import { log } from './utils';
|
||||
@@ -335,7 +335,7 @@ export const UpdateProvider = ({
|
||||
}, [parseTestPayload]);
|
||||
|
||||
return (
|
||||
<ClientContext.Provider
|
||||
<UpdateContext.Provider
|
||||
value={{
|
||||
checkUpdate,
|
||||
switchVersion,
|
||||
@@ -354,7 +354,7 @@ export const UpdateProvider = ({
|
||||
parseTestQrCode,
|
||||
}}>
|
||||
{children}
|
||||
</ClientContext.Provider>
|
||||
</UpdateContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user