🎨 Minor code cleanup

This commit is contained in:
Philipp Stracker 2025-01-17 19:22:01 +01:00
parent 1726878f55
commit cd63b18608
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -1,12 +1,12 @@
import { Button } from '@wordpress/components'; import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
import TopNavigation from '../../../ReusableComponents/TopNavigation';
import { CommonHooks, StylingHooks } from '../../../../data'; import { CommonHooks, StylingHooks } from '../../../../data';
import TopNavigation from '../../../ReusableComponents/TopNavigation';
import BusyStateWrapper from '../../../ReusableComponents/BusyStateWrapper'; import BusyStateWrapper from '../../../ReusableComponents/BusyStateWrapper';
const SettingsNavigation = () => { const SettingsNavigation = () => {
const { withActivity, isBusy } = CommonHooks.useBusyState(); const { withActivity } = CommonHooks.useBusyState();
// Todo: Implement other stores here. // Todo: Implement other stores here.
const { persist: persistStyling } = StylingHooks.useStore(); const { persist: persistStyling } = StylingHooks.useStore();

View file

@ -41,8 +41,9 @@ const useHooks = () => {
console.error( console.error(
`Trying to access non-existent style property: ${ locationId }.${ prop }. Possibly wrong style name - review the reducer.` `Trying to access non-existent style property: ${ locationId }.${ prop }. Possibly wrong style name - review the reducer.`
); );
return null;
} }
return persistentData[ locationId ]?.[ prop ]; return persistentData[ locationId ][ prop ];
}, },
[ persistentData ] [ persistentData ]
); );