This is a bit of nitpicking, but that if clause can be simplified to just `localStorage.userHasOptedIntoSharing === 'true'` I think.