mirror of
https://github.com/ascribe/onion.git
synced 2025-01-05 11:25:09 +01:00
construct header method added to utils
This commit is contained in:
parent
c69767c10b
commit
ae2578a57c
@ -29,7 +29,7 @@ import NavRoutesLinks from './nav_routes_links';
|
|||||||
import { mergeOptions } from '../utils/general_utils';
|
import { mergeOptions } from '../utils/general_utils';
|
||||||
import { getLangText } from '../utils/lang_utils';
|
import { getLangText } from '../utils/lang_utils';
|
||||||
|
|
||||||
import setFavicon from 'favicon-setter';
|
import {constructHead} from '../utils/head_setter';
|
||||||
|
|
||||||
let Header = React.createClass({
|
let Header = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
@ -64,10 +64,9 @@ let Header = React.createClass({
|
|||||||
WhitelabelStore.unlisten(this.onChange);
|
WhitelabelStore.unlisten(this.onChange);
|
||||||
},
|
},
|
||||||
getLogo(){
|
getLogo(){
|
||||||
let logoPath = this.state.whitelabel.logo;
|
constructHead(this.state.whitelabel.head);
|
||||||
setFavicon(logoPath);
|
|
||||||
if (this.state.whitelabel.subdomain !== 'www'){
|
if (this.state.whitelabel.subdomain !== 'www'){
|
||||||
return <img className="img-brand" src={logoPath}/>;
|
return <img className="img-brand" src={this.state.whitelabel.logo}/>;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return (
|
return (
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
"eslint": "^0.22.1",
|
"eslint": "^0.22.1",
|
||||||
"eslint-plugin-react": "^2.5.0",
|
"eslint-plugin-react": "^2.5.0",
|
||||||
"express": "^4.12.4",
|
"express": "^4.12.4",
|
||||||
"favicon-setter": "^0.1.1",
|
|
||||||
"gulp": "^3.8.11",
|
"gulp": "^3.8.11",
|
||||||
"gulp-concat": "^2.5.2",
|
"gulp-concat": "^2.5.2",
|
||||||
"gulp-eslint": "^0.13.2",
|
"gulp-eslint": "^0.13.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user