mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +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 { History } from 'react-router';
|
||||
|
||||
import Footer from './footer';
|
||||
import GlobalNotification from './global_notification';
|
||||
|
||||
import AppConstants from '../constants/application_constants';
|
||||
@ -48,7 +47,6 @@ export default function AppBase(App) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Footer />
|
||||
<App
|
||||
{...this.props}
|
||||
activeRoute={activeRoute} />
|
||||
|
@ -3,6 +3,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import AppBase from './app_base';
|
||||
import Footer from './footer';
|
||||
import Header from './header';
|
||||
|
||||
|
||||
@ -23,6 +24,7 @@ let AscribeApp = React.createClass({
|
||||
{/* Routes are injected here */}
|
||||
{children}
|
||||
</div>
|
||||
<Footer activeRoute={activeRoute} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -5,8 +5,12 @@ import React from 'react';
|
||||
import { getLangText } from '../utils/lang_utils';
|
||||
|
||||
let Footer = React.createClass({
|
||||
propTypes: {
|
||||
activeRoute: React.PropTypes.object.isRequired
|
||||
},
|
||||
|
||||
render() {
|
||||
return (
|
||||
return !this.props.activeRoute.hideFooter ? (
|
||||
<div className="ascribe-footer hidden-print">
|
||||
<p className="ascribe-sub-sub-statement">
|
||||
<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>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
) : null;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -11,6 +11,7 @@ import UserActions from '../../../../actions/user_actions';
|
||||
import Hero from './components/pr_hero';
|
||||
|
||||
import AppBase from '../../../app_base';
|
||||
import Footer from '../../../footer';
|
||||
import Header from '../../../header';
|
||||
|
||||
import { getSubdomain } from '../../../../utils/general_utils';
|
||||
@ -85,6 +86,7 @@ let PRApp = React.createClass({
|
||||
{/* Routes are injected here */}
|
||||
{children}
|
||||
</div>
|
||||
<Footer activeRoute={activeRoute} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import classNames from 'classnames';
|
||||
import Hero from './components/prize_hero';
|
||||
|
||||
import AppBase from '../../../app_base';
|
||||
import Footer from '../../../footer';
|
||||
import Header from '../../../header';
|
||||
|
||||
import { getSubdomain } from '../../../../utils/general_utils';
|
||||
@ -42,6 +43,7 @@ let PrizeApp = React.createClass({
|
||||
{/* Routes are injected here */}
|
||||
{children}
|
||||
</div>
|
||||
<Footer activeRoute={activeRoute} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import AppBase from '../../app_base';
|
||||
import Footer from '../../footer';
|
||||
import Header from '../../header';
|
||||
|
||||
import { getSubdomain } from '../../../utils/general_utils';
|
||||
@ -43,6 +44,7 @@ let WalletApp = React.createClass({
|
||||
{/* Routes are injected here */}
|
||||
{children}
|
||||
</div>
|
||||
<Footer activeRoute={activeRoute} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user