1
0
mirror of https://github.com/ascribe/onion.git synced 2025-02-14 21:10:27 +01:00

bug fix breadcrumbs

bug fix sluice landing page
bug fix sluice register_piece
bug fix ownershiphistory pending
This commit is contained in:
diminator 2015-08-19 17:18:32 +02:00
parent b66fdc332d
commit 7e9e187c18
4 changed files with 39 additions and 8 deletions

View File

@ -165,7 +165,7 @@ let SlidesContainer = React.createClass({
let breadcrumbs = [];
ReactAddons.Children.map(this.props.children, (child, i) => {
if(i >= this.state.startFrom) {
if(i >= this.state.startFrom && child.props['data-slide-title']) {
breadcrumbs.push(child.props['data-slide-title']);
}
});

View File

@ -1,6 +1,10 @@
'use strict';
import React from 'react';
import PrizeActions from '../actions/prize_actions';
import PrizeStore from '../stores/prize_store';
import RegisterPiece from '../../../register_piece';
import Property from '../../../ascribe_forms/property';
import InputTextAreaToggable from '../../../ascribe_forms/input_textarea_toggable';
@ -10,7 +14,25 @@ import { getLangText } from '../../../../utils/lang_utils';
let PrizeRegisterPiece = React.createClass({
getInitialState() {
return PrizeStore.getState();
},
componentDidMount() {
PrizeStore.listen(this.onChange);
PrizeActions.fetchPrize();
},
componentWillUnmount() {
PrizeStore.unlisten(this.onChange);
},
onChange(state) {
this.setState(state);
},
render() {
if (this.state.prize.active){
return (
<RegisterPiece
enableLocalHashing={false}
@ -49,9 +71,18 @@ let PrizeRegisterPiece = React.createClass({
</span>
</InputCheckbox>
</Property>
</RegisterPiece>
</RegisterPiece>);
}
else {
return (
<div className='row'>
<div style={{textAlign: 'center'}}>
The prize is no longer active
</div>
</div>
);
}
}
});
export default PrizeRegisterPiece;

View File

@ -23,9 +23,7 @@ let PrizeApp = React.createClass({
return (
<div className="container ascribe-prize-app">
{header}
<div className="wp">
<RouteHandler />
</div>
<GlobalNotification />
<div id="modal" className="container"></div>
<Footer />

View File

@ -14,7 +14,9 @@ let WalletApp = React.createClass({
render() {
let header = null;
if (this.isActive('landing') || this.isActive('login') || this.isActive('signup')) {
let subdomain = window.location.host.split('.')[0];
if ((this.isActive('landing') || this.isActive('login') || this.isActive('signup'))
&& (['ikonotv', 'cyland']).indexOf(subdomain) > -1) {
header = (
<div className="hero"/>);
} else {