perf: remove unneeded divs and replace with <>, remove outdated notes code

This commit is contained in:
David Ralph
2021-03-22 22:17:52 +00:00
parent 29171bce5d
commit 5dd11aca94
28 changed files with 80 additions and 90 deletions

View File

@@ -39,13 +39,8 @@ export default class Notes extends React.PureComponent {
}
render() {
let classList = 'notescontainer';
if (localStorage.getItem('darkTheme') === 'true') {
classList += ' dark';
}
return (
<span id='noteContainer' className={classList}>
<span id='noteContainer' className='notescontainer'>
<div className='topbarnotes'>
<NotesIcon/>
<h3>{this.language.title}</h3>

View File

@@ -143,7 +143,7 @@ export default class Quote extends React.PureComponent {
this.setState({
favourited: localStorage.getItem('favouriteQuote') ? <StarIcon className='copyButton' onClick={() => this.favourite()} /> : null,
copy: (localStorage.getItem('copyButton') === 'false') ? null : this.state.copy,
tweet: (localStorage.getItem('tweetButton') === 'false') ? null: this.state.tweet
tweet: (localStorage.getItem('tweetButton') === 'false') ? null : this.state.tweet
});
this.getQuote();

View File

@@ -70,13 +70,13 @@ export default class Search extends React.PureComponent {
render() {
return (
<div id='searchBar'>
<form action={this.state.url}>
<>
<form action={this.state.url} id='searchBar'>
{this.state.microphone}
<SearchIcon onClick={() => this.searchButton()} id='searchButton'/>
<input type='text' placeholder={this.language} name={this.state.query} id='searchtext'/>
</form>
</div>
</>
);
}
}