Merge branch 'master' into new/edit/home-exctractcommonsetupsteps

This commit is contained in:
Trevor Buckner
2026-09-09 21:51:12 -04:00
committed by GitHub
2 changed files with 7 additions and 7 deletions
+6 -7
View File
@@ -130,8 +130,8 @@ const EditPage = (props)=>{
};
const handleGoogleClick = ()=>{
if(global.account !== currentBrew.authors[0]) {
setalertOwnershipToTransfer(true);
if(currentBrew.authors.length > 0 && global.account?.username !== currentBrew.authors[0]) {
setAlertOwnershipToTransfer(true);
return;
}
if(!global.account?.googleId) {
@@ -148,7 +148,7 @@ const EditPage = (props)=>{
setAlertTrashedGoogleBrew(false);
setAlertNoGoogleToTransfer(false);
setConfirmGoogleTransfer(false);
setalertOwnershipToTransfer(false);
setAlertOwnershipToTransfer(false);
};
const toggleGoogleStorage = (e)=>{
@@ -234,12 +234,11 @@ const EditPage = (props)=>{
<Nav.item className='googleDriveStorage' onClick={handleGoogleClick}>
<img src={googleDriveIcon} className={saveGoogle ? '' : 'inactive'} alt='Google Drive icon' />
{alertOwnershipToTransfer && (
<div className='errorContainer'>
You must be the Owner to transfer between the Homebrewery and Google Drive!
The owner of this file is {currentBrew.authors[0]}
You must be the Owner to transfer between the Homebrewery and Google Drive!
The owner of this file is {currentBrew.authors[0]}.
<br></br>
<div className='confirm' onClick={closeAlerts}> Okay </div>
</div>
)}
@@ -167,6 +167,7 @@ const NewPage = (props)=>{
localStorage.removeItem(BREWKEY);
localStorage.removeItem(STYLEKEY);
localStorage.removeItem(METAKEY);
window.onbeforeunload = null;
window.location = `/edit/${savedBrew.editId}`;
};