-
-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #476 from cboard-org/revert-475-fix-cordova-produc…
…tion Revert "restore old files"
- Loading branch information
Showing
4 changed files
with
119 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
import './polyfills'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Provider } from 'react-redux'; | ||
import { BrowserRouter, Route } from 'react-router-dom'; | ||
import { BrowserRouter, HashRouter, Route } from 'react-router-dom'; | ||
import { PersistGate } from 'redux-persist/es/integration/react'; | ||
|
||
import configureStore, { getStore } from './store'; | ||
|
||
import SpeechProvider from './providers/SpeechProvider'; | ||
import LanguageProvider from './providers/LanguageProvider'; | ||
import ThemeProvider from './providers/ThemeProvider'; | ||
import App from './components/App'; | ||
import { isCordova, onCordovaReady } from './cordova-util'; | ||
import './index.css'; | ||
import './polyfills'; | ||
import LanguageProvider from './providers/LanguageProvider'; | ||
import SpeechProvider from './providers/SpeechProvider'; | ||
import ThemeProvider from './providers/ThemeProvider'; | ||
import configureStore, { getStore } from './store'; | ||
|
||
const { persistor } = configureStore(); | ||
const store = getStore(); | ||
|
||
ReactDOM.render( | ||
<Provider store={store}> | ||
<PersistGate persistor={persistor}> | ||
<SpeechProvider> | ||
<LanguageProvider> | ||
<ThemeProvider> | ||
<BrowserRouter> | ||
<Route path="/" component={App} /> | ||
</BrowserRouter> | ||
</ThemeProvider> | ||
</LanguageProvider> | ||
</SpeechProvider> | ||
</PersistGate> | ||
</Provider>, | ||
document.getElementById('root') | ||
); | ||
// When running in Cordova, must use the HashRouter | ||
const PlatformRouter = isCordova() ? HashRouter : BrowserRouter; | ||
|
||
const renderApp = () => { | ||
ReactDOM.render( | ||
<Provider store={store}> | ||
<PersistGate persistor={persistor}> | ||
<SpeechProvider> | ||
<LanguageProvider> | ||
<ThemeProvider> | ||
<PlatformRouter> | ||
<Route path="/" component={App} /> | ||
</PlatformRouter> | ||
</ThemeProvider> | ||
</LanguageProvider> | ||
</SpeechProvider> | ||
</PersistGate> | ||
</Provider>, | ||
document.getElementById('root') | ||
); | ||
}; | ||
|
||
isCordova() ? onCordovaReady(renderApp) : renderApp(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -861,6 +861,13 @@ | |
dependencies: | ||
regenerator-runtime "^0.13.2" | ||
|
||
"@babel/runtime@^7.4.0": | ||
version "7.6.0" | ||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.0.tgz#4fc1d642a9fd0299754e8b5de62c631cf5568205" | ||
integrity sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ== | ||
dependencies: | ||
regenerator-runtime "^0.13.2" | ||
|
||
"@babel/template@^7.1.0", "@babel/template@^7.2.2", "@babel/template@^7.4.4": | ||
version "7.4.4" | ||
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" | ||
|
@@ -3793,6 +3800,11 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.0.0.tgz#24e37c041741c5f4b25324958ebbc34bca965935" | ||
integrity sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg== | ||
|
||
dotenv@^6.2.0: | ||
version "6.2.0" | ||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" | ||
integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== | ||
|
||
duplexer2@~0.1.4: | ||
version "0.1.4" | ||
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" | ||
|
@@ -5310,17 +5322,17 @@ hex-color-regex@^1.1.0: | |
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" | ||
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== | ||
|
||
history@^4.7.2: | ||
version "4.9.0" | ||
resolved "https://registry.yarnpkg.com/history/-/history-4.9.0.tgz#84587c2068039ead8af769e9d6a6860a14fa1bca" | ||
integrity sha512-H2DkjCjXf0Op9OAr6nJ56fcRkTSNrUiv41vNJ6IswJjif6wlpZK0BTfFbi7qK9dXLSYZxkq5lBsj3vUjlYBYZA== | ||
history@^4.9.0: | ||
version "4.10.1" | ||
resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" | ||
integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== | ||
dependencies: | ||
"@babel/runtime" "^7.1.2" | ||
loose-envify "^1.2.0" | ||
resolve-pathname "^2.2.0" | ||
resolve-pathname "^3.0.0" | ||
tiny-invariant "^1.0.2" | ||
tiny-warning "^1.0.0" | ||
value-equal "^0.4.0" | ||
value-equal "^1.0.1" | ||
|
||
hmac-drbg@^1.0.0: | ||
version "1.0.1" | ||
|
@@ -7625,6 +7637,15 @@ mimic-fn@^2.0.0: | |
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" | ||
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== | ||
|
||
mini-create-react-context@^0.3.0: | ||
version "0.3.2" | ||
resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz#79fc598f283dd623da8e088b05db8cddab250189" | ||
integrity sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw== | ||
dependencies: | ||
"@babel/runtime" "^7.4.0" | ||
gud "^1.0.0" | ||
tiny-warning "^1.0.2" | ||
|
||
[email protected]: | ||
version "0.5.0" | ||
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz#ac0059b02b9692515a637115b0cc9fed3a35c7b0" | ||
|
@@ -9705,6 +9726,15 @@ react-app-polyfill@^0.2.2: | |
raf "3.4.1" | ||
whatwg-fetch "3.0.0" | ||
|
||
react-app-rewired@^2.1.3: | ||
version "2.1.3" | ||
resolved "https://registry.yarnpkg.com/react-app-rewired/-/react-app-rewired-2.1.3.tgz#5ae8583ecc9f9f968d40b735d2abbe871378a52f" | ||
integrity sha512-NXC2EsQrnEMV7xD70rHcBq0B4PSEzjY/K2m/e+GRgit2jZO/uZApnpCZSKvIX2leLRN69Sqf2id0VXZ1F62CDw== | ||
dependencies: | ||
cross-spawn "^6.0.5" | ||
dotenv "^6.2.0" | ||
semver "^5.6.0" | ||
|
||
react-autosuggest@^9.4.2: | ||
version "9.4.3" | ||
resolved "https://registry.yarnpkg.com/react-autosuggest/-/react-autosuggest-9.4.3.tgz#eb46852422a48144ab9f39fb5470319222f26c7c" | ||
|
@@ -9877,30 +9907,34 @@ [email protected]: | |
prop-types "15.x" | ||
react-draggable "^3.0.3" | ||
|
||
react-router-dom@^4.3.1: | ||
version "4.3.1" | ||
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.3.1.tgz#4c2619fc24c4fa87c9fd18f4fb4a43fe63fbd5c6" | ||
integrity sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA== | ||
react-router-dom@^5.0.1: | ||
version "5.0.1" | ||
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.0.1.tgz#ee66f4a5d18b6089c361958e443489d6bab714be" | ||
integrity sha512-zaVHSy7NN0G91/Bz9GD4owex5+eop+KvgbxXsP/O+iW1/Ln+BrJ8QiIR5a6xNPtrdTvLkxqlDClx13QO1uB8CA== | ||
dependencies: | ||
history "^4.7.2" | ||
invariant "^2.2.4" | ||
"@babel/runtime" "^7.1.2" | ||
history "^4.9.0" | ||
loose-envify "^1.3.1" | ||
prop-types "^15.6.1" | ||
react-router "^4.3.1" | ||
warning "^4.0.1" | ||
prop-types "^15.6.2" | ||
react-router "5.0.1" | ||
tiny-invariant "^1.0.2" | ||
tiny-warning "^1.0.0" | ||
|
||
react-router@^4.3.1: | ||
version "4.3.1" | ||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.3.1.tgz#aada4aef14c809cb2e686b05cee4742234506c4e" | ||
integrity sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg== | ||
react-router@5.0.1: | ||
version "5.0.1" | ||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.0.1.tgz#04ee77df1d1ab6cb8939f9f01ad5702dbadb8b0f" | ||
integrity sha512-EM7suCPNKb1NxcTZ2LEOWFtQBQRQXecLxVpdsP4DW4PbbqYWeRiLyV/Tt1SdCrvT2jcyXAXmVTmzvSzrPR63Bg== | ||
dependencies: | ||
history "^4.7.2" | ||
hoist-non-react-statics "^2.5.0" | ||
invariant "^2.2.4" | ||
"@babel/runtime" "^7.1.2" | ||
history "^4.9.0" | ||
hoist-non-react-statics "^3.1.0" | ||
loose-envify "^1.3.1" | ||
mini-create-react-context "^0.3.0" | ||
path-to-regexp "^1.7.0" | ||
prop-types "^15.6.1" | ||
warning "^4.0.1" | ||
prop-types "^15.6.2" | ||
react-is "^16.6.0" | ||
tiny-invariant "^1.0.2" | ||
tiny-warning "^1.0.0" | ||
|
||
[email protected]: | ||
version "0.0.17" | ||
|
@@ -10447,10 +10481,10 @@ resolve-from@^4.0.0: | |
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" | ||
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== | ||
|
||
resolve-pathname@^2.2.0: | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" | ||
integrity sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg== | ||
resolve-pathname@^3.0.0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" | ||
integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== | ||
|
||
resolve-url@^0.2.1: | ||
version "0.2.1" | ||
|
@@ -12096,10 +12130,10 @@ validate-npm-package-license@^3.0.1: | |
spdx-correct "^3.0.0" | ||
spdx-expression-parse "^3.0.0" | ||
|
||
value-equal@^0.4.0: | ||
version "0.4.0" | ||
resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" | ||
integrity sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw== | ||
value-equal@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" | ||
integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== | ||
|
||
vary@~1.1.2: | ||
version "1.1.2" | ||
|