mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
🚨 Fix build warnings
This commit is contained in:
@@ -16,6 +16,10 @@ export const ChangeWidgetPositionModal = ({
|
|||||||
const updateConfig = useConfigStore((x) => x.updateConfig);
|
const updateConfig = useConfigStore((x) => x.updateConfig);
|
||||||
const shapeSize = useGridstackStore((x) => x.currentShapeSize);
|
const shapeSize = useGridstackStore((x) => x.currentShapeSize);
|
||||||
|
|
||||||
|
if (shapeSize === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const handleSubmit = (x: number, y: number, width: number, height: number) => {
|
const handleSubmit = (x: number, y: number, width: number, height: number) => {
|
||||||
if (!configName) {
|
if (!configName) {
|
||||||
return;
|
return;
|
||||||
@@ -59,10 +63,10 @@ export const ChangeWidgetPositionModal = ({
|
|||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
heightData={heightData}
|
heightData={heightData}
|
||||||
widthData={widthData}
|
widthData={widthData}
|
||||||
initialX={innerProps.widget.shape[shapeSize].location.x}
|
initialX={innerProps.widget.shape[shapeSize]?.location.x}
|
||||||
initialY={innerProps.widget.shape[shapeSize].location.y}
|
initialY={innerProps.widget.shape[shapeSize]?.location.y}
|
||||||
initialWidth={innerProps.widget.shape[shapeSize].size.width}
|
initialWidth={innerProps.widget.shape[shapeSize]?.size.width}
|
||||||
initialHeight={innerProps.widget.shape[shapeSize].size.height}
|
initialHeight={innerProps.widget.shape[shapeSize]?.size.height}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -104,12 +104,12 @@ export const useGridstack = (
|
|||||||
|
|
||||||
currentItem.shape[shapeSize] = {
|
currentItem.shape[shapeSize] = {
|
||||||
location: {
|
location: {
|
||||||
x: changedNode.x ?? currentItem.shape[shapeSize].location.x,
|
x: changedNode.x!,
|
||||||
y: changedNode.y ?? currentItem.shape[shapeSize].location.y,
|
y: changedNode.y!,
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
width: changedNode.w ?? currentItem.shape[shapeSize].size.width,
|
width: changedNode.w!,
|
||||||
height: changedNode.h ?? currentItem.shape[shapeSize].size.height,
|
height: changedNode.h!,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -170,12 +170,12 @@ export const useGridstack = (
|
|||||||
|
|
||||||
currentItem.shape[shapeSize] = {
|
currentItem.shape[shapeSize] = {
|
||||||
location: {
|
location: {
|
||||||
x: addedNode.x ?? currentItem.shape[shapeSize].location.x,
|
x: addedNode.x!,
|
||||||
y: addedNode.y ?? currentItem.shape[shapeSize].location.y,
|
y: addedNode.y!,
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
width: addedNode.w ?? currentItem.shape[shapeSize].size.width,
|
width: addedNode.w!,
|
||||||
height: addedNode.h ?? currentItem.shape[shapeSize].size.height,
|
height: addedNode.h!,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, ScrollArea, Stack } from '@mantine/core';
|
import { ScrollArea, Stack } from '@mantine/core';
|
||||||
import { useViewportSize } from '@mantine/hooks';
|
import { useViewportSize } from '@mantine/hooks';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { useConfigContext } from '../../../config/provider';
|
import { useConfigContext } from '../../../config/provider';
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { AppIntegrationType, AppType, IntegrationType } from '../../types/app';
|
|||||||
import { AreaType } from '../../types/area';
|
import { AreaType } from '../../types/area';
|
||||||
import { CategoryType } from '../../types/category';
|
import { CategoryType } from '../../types/category';
|
||||||
import { ConfigType } from '../../types/config';
|
import { ConfigType } from '../../types/config';
|
||||||
import widgets from '../../widgets';
|
|
||||||
import { IBitTorrent } from '../../widgets/bitTorrent/BitTorrentTile';
|
import { IBitTorrent } from '../../widgets/bitTorrent/BitTorrentTile';
|
||||||
import { IDashDotTile } from '../../widgets/dashDot/DashDotTile';
|
import { IDashDotTile } from '../../widgets/dashDot/DashDotTile';
|
||||||
import { IDateWidget } from '../../widgets/date/DateTile';
|
import { IDateWidget } from '../../widgets/date/DateTile';
|
||||||
|
|||||||
Reference in New Issue
Block a user