2016-06-03 17:52:38 +02:00
|
|
|
import React from 'react';
|
2016-06-06 14:54:29 +02:00
|
|
|
import Redirect from 'react-router/es6/Redirect';
|
2016-06-03 17:52:38 +02:00
|
|
|
|
|
|
|
import Routes from './routes';
|
|
|
|
|
|
|
|
import ApiUrls from './constants/api_urls';
|
|
|
|
|
|
|
|
|
|
|
|
function resolve({ subdomain, type }) {
|
|
|
|
if (type === 'wallet') {
|
|
|
|
return System.import('./components/whitelabel/wallet/wallet_app_resolver')
|
|
|
|
.then(({ default: WalletAppResolver }) => WalletAppResolver.resolve(subdomain));
|
|
|
|
} else {
|
|
|
|
return Promise.resolve({
|
|
|
|
apiUrls: ApiUrls,
|
|
|
|
redirectRoute: (<Redirect from="/" to="/collection" />),
|
|
|
|
routes: Routes
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default { resolve };
|