0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

tweak comments

This commit is contained in:
Trevor Buckner
2024-04-09 11:36:13 -04:00
parent 4f0cbd82d4
commit 431dfd7780

View File

@@ -6,10 +6,8 @@ const NaturalCritIcon = require('naturalcrit/svg/naturalcrit.svg.jsx');
let SAVEKEY = '';
const AccountPage = (props)=>{
// destructure props
// destructure props and set state for save location
const { accountDetails, brew } = props;
// State for the save location
const [saveLocation, setSaveLocation] = React.useState('');
// initialize save location from local storage based on user id
@@ -23,14 +21,12 @@ const AccountPage = (props)=>{
}
}, []);
// function to set the active save location
const setActiveSaveLocation = (newSelection)=>{
if(saveLocation === newSelection) return;
window.localStorage.setItem(SAVEKEY, newSelection);
setSaveLocation(newSelection);
};
// render a button for setting save locations.
// todo: should this be a set of radio buttons (well styled) since it's either/or choice?
const renderSaveLocationButton = (name, key, shouldRender = true)=>{
if(!shouldRender) return null;