mirror of
https://github.com/mue/mue.git
synced 2026-06-05 23:45:53 +02:00
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:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user