0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00

pass userThemes as a new prop, rather than inside of the brew

This commit is contained in:
Trevor Buckner
2024-07-15 23:29:16 -04:00
parent af5434c9b7
commit dfbd85a8ce
3 changed files with 4 additions and 4 deletions

View File

@@ -66,9 +66,9 @@ const Homebrew = createClass({
<Router location={this.props.url}>
<div className='homebrew'>
<Routes>
<Route path='/edit/:id' element={<WithRoute el={EditPage} brew={this.props.brew} />} />
<Route path='/edit/:id' element={<WithRoute el={EditPage} brew={this.props.brew} userThemes={this.props.userThemes}/>} />
<Route path='/share/:id' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/new/:id' element={<WithRoute el={NewPage} brew={this.props.brew} />} />
<Route path='/new/:id' element={<WithRoute el={NewPage} brew={this.props.brew} userThemes={this.props.userThemes}/>} />
<Route path='/new' element={<WithRoute el={NewPage}/>} />
<Route path='/user/:username' element={<WithRoute el={UserPage} brews={this.props.brews} />} />
<Route path='/changelog' element={<WithRoute el={SharePage} brew={this.props.brew} />} />

View File

@@ -55,7 +55,6 @@ const EditPage = createClass({
autoSaveWarning : false,
unsavedTime : new Date(),
currentEditorPage : 0,
userThemes : this.props.brew.userThemes,
displayLockMessage : this.props.brew.lock || false
};
},
@@ -415,7 +414,7 @@ const EditPage = createClass({
theme={this.state.brew.theme}
errors={this.state.htmlErrors}
lang={this.state.brew.lang}
userThemes={this.state.brew.userThemes}
userThemes={this.props.userThemes}
currentEditorPage={this.state.currentEditorPage}
allowPrint={true}
/>

View File

@@ -218,6 +218,7 @@ const NewPage = createClass({
theme={this.state.brew.theme}
errors={this.state.htmlErrors}
lang={this.state.brew.lang}
userThemes={this.props.userThemes}
currentEditorPage={this.state.currentEditorPage}
allowPrint={true}
/>