2015-08-11 13:10:15 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import Router from 'react-router';
|
|
|
|
import Header from '../../header';
|
2015-08-18 09:42:28 +02:00
|
|
|
import Footer from '../../footer';
|
|
|
|
|
2015-08-11 13:10:15 +02:00
|
|
|
import GlobalNotification from '../../global_notification';
|
|
|
|
|
2015-08-25 16:33:26 +02:00
|
|
|
import getRoutes from './wallet_routes';
|
|
|
|
|
2015-08-11 13:10:15 +02:00
|
|
|
let RouteHandler = Router.RouteHandler;
|
|
|
|
|
|
|
|
let WalletApp = React.createClass({
|
2015-08-19 14:48:22 +02:00
|
|
|
mixins: [Router.State],
|
|
|
|
|
2015-08-11 13:10:15 +02:00
|
|
|
render() {
|
2015-08-19 17:18:32 +02:00
|
|
|
let subdomain = window.location.host.split('.')[0];
|
2015-08-25 16:33:26 +02:00
|
|
|
let ROUTES = getRoutes(null, subdomain);
|
|
|
|
|
|
|
|
let header = null;
|
2015-08-19 17:18:32 +02:00
|
|
|
if ((this.isActive('landing') || this.isActive('login') || this.isActive('signup'))
|
|
|
|
&& (['ikonotv', 'cyland']).indexOf(subdomain) > -1) {
|
2015-08-19 14:48:22 +02:00
|
|
|
header = (
|
|
|
|
<div className="hero"/>);
|
|
|
|
} else {
|
2015-08-25 16:33:26 +02:00
|
|
|
header = <Header showAddWork={true} routes={ROUTES} />;
|
2015-08-19 14:48:22 +02:00
|
|
|
}
|
2015-08-25 16:33:26 +02:00
|
|
|
|
2015-08-11 13:10:15 +02:00
|
|
|
return (
|
2015-08-17 20:52:36 +02:00
|
|
|
<div className="container ascribe-prize-app">
|
2015-08-19 14:48:22 +02:00
|
|
|
{header}
|
2015-08-12 16:26:24 +02:00
|
|
|
<RouteHandler />
|
2015-08-11 13:10:15 +02:00
|
|
|
<GlobalNotification />
|
|
|
|
<div id="modal" className="container"></div>
|
2015-08-18 09:42:28 +02:00
|
|
|
<Footer />
|
2015-08-11 13:10:15 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default WalletApp;
|