mirror of
https://github.com/ascribe/onion.git
synced 2025-01-05 11:25:09 +01:00
7014514654
Keeping an export constant is more predictable and less surprising for most people.
23 lines
719 B
JavaScript
23 lines
719 B
JavaScript
import React from 'react';
|
|
import Redirect from 'react-router/es6/Redirect';
|
|
|
|
import getWalletApiUrls from './constants/wallet_api_urls';
|
|
import getWalletRoutes from './wallet_routes';
|
|
|
|
import { mergeWithBaseApiUrls } from '../../../constants/api_urls';
|
|
|
|
|
|
function resolve(subdomain) {
|
|
// Most whitelabels have landing pages so we should not automatically redirect from / to /collection.
|
|
// Only cc does not have a landing page.
|
|
const redirectRoute = subdomain === 'cc' ? (<Redirect from="/" to="/collection" />) : null;
|
|
|
|
return {
|
|
redirectRoute,
|
|
apiUrls: mergeWithBaseApiUrls(getWalletApiUrls(subdomain)),
|
|
routes: getWalletRoutes(subdomain)
|
|
};
|
|
}
|
|
|
|
export default { resolve };
|