mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Set title to edition/piece containers
This commit is contained in:
parent
21c84774c8
commit
2967a29f2e
@ -9,6 +9,8 @@ import Edition from './edition';
|
||||
|
||||
import AppConstants from '../../constants/application_constants';
|
||||
|
||||
import { setDocumentTitle } from '../../utils/dom_utils';
|
||||
|
||||
|
||||
/**
|
||||
* This is the component that implements resource/data specific functionality
|
||||
@ -65,6 +67,8 @@ let EditionContainer = React.createClass({
|
||||
|
||||
render() {
|
||||
if(this.state.edition && this.state.edition.title) {
|
||||
setDocumentTitle([this.state.edition.artist_name, this.state.edition.title].join(', '));
|
||||
|
||||
return (
|
||||
<Edition
|
||||
edition={this.state.edition}
|
||||
|
@ -38,6 +38,7 @@ import ApiUrls from '../../constants/api_urls';
|
||||
import AppConstants from '../../constants/application_constants';
|
||||
import { mergeOptions } from '../../utils/general_utils';
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../utils/dom_utils';
|
||||
|
||||
/**
|
||||
* This is the component that implements resource/data specific functionality
|
||||
@ -210,6 +211,8 @@ let PieceContainer = React.createClass({
|
||||
|
||||
render() {
|
||||
if(this.state.piece && this.state.piece.title) {
|
||||
setDocumentTitle([this.state.piece.artist_name, this.state.piece.title].join(', '));
|
||||
|
||||
return (
|
||||
<Piece
|
||||
piece={this.state.piece}
|
||||
|
Loading…
Reference in New Issue
Block a user