bug fixes

This commit is contained in:
David Ralph
2021-01-17 16:25:21 +00:00
parent 3ec5a2c199
commit a9c06fd935
27 changed files with 180 additions and 127 deletions

View File

@@ -14,12 +14,19 @@ export default class Notes extends React.PureComponent {
setNotes = (e) => {
localStorage.setItem('notes', e.target.value);
this.setState({ notes: e.target.value });
this.setState({
notes: e.target.value
});
};
pin() {
document.getElementById('noteContainer').classList.toggle('visibilityshow');
(localStorage.getItem('notesPinned') === 'true') ? localStorage.setItem('notesPinned', false) : localStorage.setItem('notesPinned', true);
if (localStorage.getItem('notesPinned') === 'true') {
localStorage.setItem('notesPinned', false);
} else {
localStorage.setItem('notesPinned', true);
}
}
componentDidMount() {