Skip to content

Commit

Permalink
Merge branch 'addCSSRoute-naturalcrit#1097' of https://github.com/G-A…
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Ambatte committed Aug 12, 2024
2 parents 3dc8eec + e03b540 commit 337d356
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions client/homebrew/homebrew.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ const Homebrew = createClass({
<Route path='/new/:id' element={<WithRoute el={NewPage} brew={this.props.brew} userThemes={this.props.userThemes}/>} />
<Route path='/new' element={<WithRoute el={NewPage} userThemes={this.props.userThemes}/> } />
<Route path='/user/:username' element={<WithRoute el={UserPage} brews={this.props.brews} />} />
<Route path='/changelog' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/faq' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/migrate' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/changelog' element={<WithRoute el={SharePage} brew={this.props.brew} disableMeta={true} />} />
<Route path='/faq' element={<WithRoute el={SharePage} brew={this.props.brew} disableMeta={true} />} />
<Route path='/migrate' element={<WithRoute el={SharePage} brew={this.props.brew} disableMeta={true} />} />
<Route path='/account' element={<WithRoute el={AccountPage} brew={this.props.brew} accountDetails={this.props.brew.accountDetails} />} />
<Route path='/legacy' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
<Route path='/error' element={<WithRoute el={ErrorPage} brew={this.props.brew} />} />
Expand Down
17 changes: 13 additions & 4 deletions client/homebrew/pages/sharePage/sharePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const SharePage = createClass({
displayName : 'SharePage',
getDefaultProps : function() {
return {
brew : DEFAULT_BREW_LOAD,
brew : DEFAULT_BREW_LOAD,
disableMeta : false
};
},

Expand Down Expand Up @@ -68,13 +69,21 @@ const SharePage = createClass({
},

render : function(){
const titleStyle = this.props.disableMeta ? { cursor: 'default' } : {};
const titleEl = <Nav.item className='brewTitle' style={titleStyle}>{this.props.brew.title}</Nav.item>;

return <div className='sharePage sitePage'>
<Meta name='robots' content='noindex, nofollow' />
<Navbar>
<Nav.section className='titleSection'>
<MetadataNav brew={this.props.brew}>
<Nav.item className='brewTitle'>{this.props.brew.title}</Nav.item>
</MetadataNav>
{
this.props.disableMeta ?
titleEl
:
<MetadataNav brew={this.props.brew}>
{titleEl}
</MetadataNav>
}
</Nav.section>

<Nav.section>
Expand Down

0 comments on commit 337d356

Please sign in to comment.