|
|
@@ -5,9 +5,10 @@ import { Alert, Platform, BackHandler } from 'react-native';
|
|
|
|
|
|
export function checkVersion(fetchedVersion: { version: string; isActive: boolean }) {
|
|
|
const currentVersion = Constants.expoConfig?.version;
|
|
|
+
|
|
|
// console.log('currentVersion', currentVersion);
|
|
|
- // console.log('fetchedVersion', fetchedVersion.version);
|
|
|
- // console.log('fetchedVersion.isActive', fetchedVersion.isActive);
|
|
|
+ console.log('fetchedVersion', fetchedVersion.version);
|
|
|
+ console.log('fetchedVersion.isActive', fetchedVersion.isActive);
|
|
|
|
|
|
if (!fetchedVersion.isActive) {
|
|
|
Alert.alert(
|
|
|
@@ -30,7 +31,7 @@ export function checkVersion(fetchedVersion: { version: string; isActive: boolea
|
|
|
// Prevent any further code execution
|
|
|
throw new Error('MAINTENANCE_MODE');
|
|
|
}
|
|
|
-
|
|
|
+ // if (currentVersion && currentVersion !== '1.2.9') {
|
|
|
if (currentVersion && currentVersion !== fetchedVersion.version) {
|
|
|
Alert.alert(
|
|
|
'請更新到最新版本',
|