mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Hide the footer if a route has the hideFooter
attribute
This commit is contained in:
parent
764f81925b
commit
e616576fa5
@ -4,7 +4,6 @@ import React from 'react';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { History } from 'react-router';
|
import { History } from 'react-router';
|
||||||
|
|
||||||
import Footer from './footer';
|
|
||||||
import GlobalNotification from './global_notification';
|
import GlobalNotification from './global_notification';
|
||||||
|
|
||||||
import AppConstants from '../constants/application_constants';
|
import AppConstants from '../constants/application_constants';
|
||||||
@ -48,7 +47,6 @@ export default function AppBase(App) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Footer />
|
|
||||||
<App
|
<App
|
||||||
{...this.props}
|
{...this.props}
|
||||||
activeRoute={activeRoute} />
|
activeRoute={activeRoute} />
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import AppBase from './app_base';
|
import AppBase from './app_base';
|
||||||
|
import Footer from './footer';
|
||||||
import Header from './header';
|
import Header from './header';
|
||||||
|
|
||||||
|
|
||||||
@ -23,6 +24,7 @@ let AscribeApp = React.createClass({
|
|||||||
{/* Routes are injected here */}
|
{/* Routes are injected here */}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
<Footer activeRoute={activeRoute} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,12 @@ import React from 'react';
|
|||||||
import { getLangText } from '../utils/lang_utils';
|
import { getLangText } from '../utils/lang_utils';
|
||||||
|
|
||||||
let Footer = React.createClass({
|
let Footer = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
activeRoute: React.PropTypes.object.isRequired
|
||||||
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return !this.props.activeRoute.hideFooter ? (
|
||||||
<div className="ascribe-footer hidden-print">
|
<div className="ascribe-footer hidden-print">
|
||||||
<p className="ascribe-sub-sub-statement">
|
<p className="ascribe-sub-sub-statement">
|
||||||
<br />
|
<br />
|
||||||
@ -24,7 +28,7 @@ let Footer = React.createClass({
|
|||||||
<a href="https://www.linkedin.com/company/4816284?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A122827941425632318075%2CVSRPtargetId%3A4816284%2CVSRPcmpt%3Aprimary" className="social social-linked-in" target="_blank"></a>
|
<a href="https://www.linkedin.com/company/4816284?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A122827941425632318075%2CVSRPtargetId%3A4816284%2CVSRPcmpt%3Aprimary" className="social social-linked-in" target="_blank"></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
) : null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import UserActions from '../../../../actions/user_actions';
|
|||||||
import Hero from './components/pr_hero';
|
import Hero from './components/pr_hero';
|
||||||
|
|
||||||
import AppBase from '../../../app_base';
|
import AppBase from '../../../app_base';
|
||||||
|
import Footer from '../../../footer';
|
||||||
import Header from '../../../header';
|
import Header from '../../../header';
|
||||||
|
|
||||||
import { getSubdomain } from '../../../../utils/general_utils';
|
import { getSubdomain } from '../../../../utils/general_utils';
|
||||||
@ -85,6 +86,7 @@ let PRApp = React.createClass({
|
|||||||
{/* Routes are injected here */}
|
{/* Routes are injected here */}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
<Footer activeRoute={activeRoute} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import classNames from 'classnames';
|
|||||||
import Hero from './components/prize_hero';
|
import Hero from './components/prize_hero';
|
||||||
|
|
||||||
import AppBase from '../../../app_base';
|
import AppBase from '../../../app_base';
|
||||||
|
import Footer from '../../../footer';
|
||||||
import Header from '../../../header';
|
import Header from '../../../header';
|
||||||
|
|
||||||
import { getSubdomain } from '../../../../utils/general_utils';
|
import { getSubdomain } from '../../../../utils/general_utils';
|
||||||
@ -42,6 +43,7 @@ let PrizeApp = React.createClass({
|
|||||||
{/* Routes are injected here */}
|
{/* Routes are injected here */}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
<Footer activeRoute={activeRoute} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import React from 'react';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import AppBase from '../../app_base';
|
import AppBase from '../../app_base';
|
||||||
|
import Footer from '../../footer';
|
||||||
import Header from '../../header';
|
import Header from '../../header';
|
||||||
|
|
||||||
import { getSubdomain } from '../../../utils/general_utils';
|
import { getSubdomain } from '../../../utils/general_utils';
|
||||||
@ -43,6 +44,7 @@ let WalletApp = React.createClass({
|
|||||||
{/* Routes are injected here */}
|
{/* Routes are injected here */}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
<Footer activeRoute={activeRoute} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user