0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-20 16:12:40 +00:00

Make autosave common/move save button into common format

This commit is contained in:
Trevor Buckner
2025-08-30 16:28:54 -04:00
parent cea342d7f6
commit e4efc9f653
4 changed files with 156 additions and 319 deletions

View File

@@ -30,25 +30,24 @@ const HomePage = createClass({
},
render : function(){
return <BaseEditPage
return <BaseEditPage
{...this.props}
className="homePage"
parent={this}
performSave={this.save}
>
{(welcomeText, brewText, save) => {
return <>
<Meta name='google-site-verification' content='NwnAQSSJZzAT7N-p5MY6ydQ7Njm67dtbu73ZSyE5Fy4' />
<div className={cx('floatingSaveButton', { show: welcomeText != brewText })} onClick={save}>
Save current <i className='fas fa-save' />
</div>
performSave={this.save}>
{(welcomeText, brew, save) => {
return <>
<Meta name='google-site-verification' content='NwnAQSSJZzAT7N-p5MY6ydQ7Njm67dtbu73ZSyE5Fy4' />
<div className={cx('floatingSaveButton', { show: welcomeText != brew.text })} onClick={save}>
Save current <i className='fas fa-save' />
</div>
<a href='/new' className='floatingNewButton'>
Create your own <i className='fas fa-magic' />
</a>
</>
}}
</BaseEditPage>
<a href='/new' className='floatingNewButton'>
Create your own <i className='fas fa-magic' />
</a>
</>
}}
</BaseEditPage>
}
});