mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 01:52:42 +00:00
remove prop drilling
This commit is contained in:
@@ -47,6 +47,7 @@ const MetadataEditor = createClass({
|
||||
|
||||
getInitialState : function(){
|
||||
return {
|
||||
isOwner : global.account?.username && global.account?.username === this.props.metadata?.authors[0],
|
||||
showThumbnail : true
|
||||
};
|
||||
},
|
||||
@@ -212,7 +213,7 @@ const MetadataEditor = createClass({
|
||||
if(authors && authors.length){
|
||||
text = authors.join(', ');
|
||||
}
|
||||
if(!this.props.isOwner || authors.length < 2) return (
|
||||
if(!this.state.isOwner || authors.length < 2) return (
|
||||
<div className='field authors'>
|
||||
<label>authors</label>
|
||||
<div className='value'>
|
||||
|
||||
Reference in New Issue
Block a user