1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 13:41:57 +02:00
onion/js/components/whitelabel/wallet/wallet_app.js
diminator 9bfd50e3bc Merge remote-tracking branch 'remotes/origin/AD-456-ikonotv-branded-page-for-registra' into AD-943-add-custom-additional-fields
Conflicts:
	js/components/signup_container.js
	js/components/whitelabel/wallet/components/ikonotv/ikonotv_landing.js
2015-09-21 10:21:44 +02:00

49 lines
1.4 KiB
JavaScript

'use strict';
import React from 'react';
import Router from 'react-router';
import Header from '../../header';
import Footer from '../../footer';
import GlobalNotification from '../../global_notification';
import getRoutes from './wallet_routes';
import classNames from 'classnames';
let RouteHandler = Router.RouteHandler;
let WalletApp = React.createClass({
mixins: [Router.State],
render() {
let subdomain = window.location.host.split('.')[0];
let ROUTES = getRoutes(null, subdomain);
let activeRoutes = this.getRoutes().map(elem => 'route--' + elem.name);
let header = null;
if ((this.isActive('landing') || this.isActive('login') || this.isActive('signup') || this.isActive('contract_notifications'))
&& (['ikonotv', 'cyland']).indexOf(subdomain) > -1) {
header = (
<div className="hero"/>);
} else {
header = <Header showAddWork={true} routes={ROUTES} />;
}
return (
<div className={classNames('ascribe-wallet-app', 'client--' + subdomain, activeRoutes)}>
<div className='container'>
{header}
<RouteHandler />
<GlobalNotification />
<div id="modal" className="container"></div>
<Footer />
</div>
</div>
);
}
});
export default WalletApp;