mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-02 15:02:38 +00:00
Simplify some logic
This commit is contained in:
@@ -196,8 +196,8 @@ const MetadataEditor = createClass({
|
|||||||
|
|
||||||
const listThemes = (renderer)=>{
|
const listThemes = (renderer)=>{
|
||||||
return _.map(_.values(mergedThemes[renderer]), (theme)=>{
|
return _.map(_.values(mergedThemes[renderer]), (theme)=>{
|
||||||
const preview = theme?.thumbnail ? theme.thumbnail : `/themes/${theme.renderer}/${theme.path}/dropdownPreview.png`;
|
const preview = theme.thumbnail || `/themes/${theme.renderer}/${theme.path}/dropdownPreview.png`;
|
||||||
const texture = theme?.thumbnail ? theme.thumbnail : `/themes/${theme.renderer}/${theme.path}/dropdownTexture.png`;
|
const texture = theme.thumbnail || `/themes/${theme.renderer}/${theme.path}/dropdownTexture.png`;
|
||||||
return <div className='item' key={`${renderer}_${theme.name}`} onClick={()=>this.handleTheme(theme)} title={''}>
|
return <div className='item' key={`${renderer}_${theme.name}`} onClick={()=>this.handleTheme(theme)} title={''}>
|
||||||
<p>{`${theme?.author ? theme.author : renderer} : ${theme.name}`}</p>
|
<p>{`${theme?.author ? theme.author : renderer} : ${theme.name}`}</p>
|
||||||
<div className='texture-container'>
|
<div className='texture-container'>
|
||||||
|
|||||||
Reference in New Issue
Block a user