Refactor state updates for consistency and readability across components

- Simplified state updates in Background, Favourite, PhotoInformation, GreetingOptions, Added, Browse, About, Overview, Navbar, Apps, Notes, QuickLinksOptions, Quote, and QuoteOptions components by consolidating multiple lines into single line updates.
- Improved readability by reducing unnecessary line breaks and maintaining consistent formatting in JSX elements.
- Enhanced maintainability by ensuring uniformity in how state is set and how JSX is structured.
This commit is contained in:
alexsparkes
2025-10-27 23:27:37 +00:00
parent 6f05e3bf03
commit 467adcdd85
18 changed files with 296 additions and 480 deletions

View File

@@ -45,15 +45,11 @@ class Apps extends PureComponent {
}
showApps() {
this.setState({
showApps: true,
});
this.setState({ showApps: true });
}
hideApps() {
this.setState({
showApps: localStorage.getItem('AppsPinned') === 'true',
});
this.setState({ showApps: localStorage.getItem('AppsPinned') === 'true' });
}
render() {
@@ -137,9 +133,7 @@ function AppsWrapper() {
const { x, y, refs, strategy } = useFloating({
placement: 'bottom',
middleware: [shift()],
elements: {
reference,
},
elements: { reference },
});
return (