mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
✨ Migrate integrations to widgets
This commit is contained in:
@@ -2,6 +2,7 @@ import { Group, Stack } from '@mantine/core';
|
||||
import { useMemo } from 'react';
|
||||
import { useConfigContext } from '../../../config/provider';
|
||||
import { useScreenLargerThan } from '../../../tools/hooks/useScreenLargerThan';
|
||||
import { useScreenSmallerThan } from '../../../tools/hooks/useScreenSmallerThan';
|
||||
import { CategoryType } from '../../../types/category';
|
||||
import { WrapperType } from '../../../types/wrapper';
|
||||
import { DashboardCategory } from '../Wrappers/Category/Category';
|
||||
@@ -11,11 +12,11 @@ import { DashboardWrapper } from '../Wrappers/Wrapper/Wrapper';
|
||||
export const DashboardView = () => {
|
||||
const wrappers = useWrapperItems();
|
||||
const layoutSettings = useConfigContext()?.config?.settings.customization.layout;
|
||||
const showSidebars = useScreenLargerThan('md');
|
||||
const doNotShowSidebar = useScreenSmallerThan('md');
|
||||
|
||||
return (
|
||||
<Group align="top" h="100%">
|
||||
{layoutSettings?.enabledLeftSidebar && showSidebars ? (
|
||||
{layoutSettings?.enabledLeftSidebar && !doNotShowSidebar ? (
|
||||
<DashboardSidebar location="left" />
|
||||
) : null}
|
||||
<Stack mx={-10} style={{ flexGrow: 1 }}>
|
||||
@@ -27,7 +28,7 @@ export const DashboardView = () => {
|
||||
)
|
||||
)}
|
||||
</Stack>
|
||||
{layoutSettings?.enabledRightSidebar && showSidebars ? (
|
||||
{layoutSettings?.enabledRightSidebar && !doNotShowSidebar ? (
|
||||
<DashboardSidebar location="right" />
|
||||
) : null}
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user