0ef3852029
- Removed the App_SetTheme IPC channel and related theme management code. - Updated imports to use preferenceTypes for theme and selection action items. - Refactored preference service to preload preferences and adjusted related components. - Cleaned up unused code and comments related to theme management. - Enhanced the organization of preference-related types and actions for better maintainability.
13 lines
389 B
TypeScript
13 lines
389 B
TypeScript
import { usePreference } from '@data/hooks/usePreference'
|
|
|
|
export const useNavbarPosition = () => {
|
|
const [navbarPosition, setNavbarPosition] = usePreference('ui.navbar.position')
|
|
|
|
return {
|
|
navbarPosition,
|
|
isLeftNavbar: navbarPosition === 'left',
|
|
isTopNavbar: navbarPosition === 'top',
|
|
setNavbarPosition: (position: 'left' | 'top') => setNavbarPosition(position)
|
|
}
|
|
}
|