Added unsuported browser and plugin required pages

This commit is contained in:
Ilya Daynatovich
2017-02-02 18:01:03 +02:00
committed by Lyubo Marinov
parent c1b9b7a623
commit 1268afd3f8
8 changed files with 159 additions and 225 deletions

View File

@@ -1,5 +1,11 @@
/* global APP */
import { Platform } from '../react';
import { UnsupportedMobileBrowser } from '../../unsupported-browser';
import {
UnsupportedDesktopBrowser,
PluginRequiredBrowser,
UnsupportedMobileBrowser
} from '../../unsupported-browser';
/**
* Array of rules defining whether we should intercept component to render
@@ -26,6 +32,17 @@ const _RULES = [
if (OS === 'android' || OS === 'ios') {
return UnsupportedMobileBrowser;
}
},
() => {
if (APP.unsupportedBrowser) {
const { isOldBrowser } = APP.unsupportedBrowser;
if (isOldBrowser) {
return UnsupportedDesktopBrowser;
}
return PluginRequiredBrowser;
}
}
];