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 shapeSize = useGridstackStore((x) => x.currentShapeSize);
|
||||
|
||||
if (shapeSize === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const handleSubmit = (x: number, y: number, width: number, height: number) => {
|
||||
if (!configName) {
|
||||
return;
|
||||
@@ -59,10 +63,10 @@ export const ChangeWidgetPositionModal = ({
|
||||
onCancel={handleCancel}
|
||||
heightData={heightData}
|
||||
widthData={widthData}
|
||||
initialX={innerProps.widget.shape[shapeSize].location.x}
|
||||
initialY={innerProps.widget.shape[shapeSize].location.y}
|
||||
initialWidth={innerProps.widget.shape[shapeSize].size.width}
|
||||
initialHeight={innerProps.widget.shape[shapeSize].size.height}
|
||||
initialX={innerProps.widget.shape[shapeSize]?.location.x}
|
||||
initialY={innerProps.widget.shape[shapeSize]?.location.y}
|
||||
initialWidth={innerProps.widget.shape[shapeSize]?.size.width}
|
||||
initialHeight={innerProps.widget.shape[shapeSize]?.size.height}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -104,12 +104,12 @@ export const useGridstack = (
|
||||
|
||||
currentItem.shape[shapeSize] = {
|
||||
location: {
|
||||
x: changedNode.x ?? currentItem.shape[shapeSize].location.x,
|
||||
y: changedNode.y ?? currentItem.shape[shapeSize].location.y,
|
||||
x: changedNode.x!,
|
||||
y: changedNode.y!,
|
||||
},
|
||||
size: {
|
||||
width: changedNode.w ?? currentItem.shape[shapeSize].size.width,
|
||||
height: changedNode.h ?? currentItem.shape[shapeSize].size.height,
|
||||
width: changedNode.w!,
|
||||
height: changedNode.h!,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -170,12 +170,12 @@ export const useGridstack = (
|
||||
|
||||
currentItem.shape[shapeSize] = {
|
||||
location: {
|
||||
x: addedNode.x ?? currentItem.shape[shapeSize].location.x,
|
||||
y: addedNode.y ?? currentItem.shape[shapeSize].location.y,
|
||||
x: addedNode.x!,
|
||||
y: addedNode.y!,
|
||||
},
|
||||
size: {
|
||||
width: addedNode.w ?? currentItem.shape[shapeSize].size.width,
|
||||
height: addedNode.h ?? currentItem.shape[shapeSize].size.height,
|
||||
width: addedNode.w!,
|
||||
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 { useTranslation } from 'next-i18next';
|
||||
import { useConfigContext } from '../../../config/provider';
|
||||
|
||||
@@ -4,7 +4,6 @@ import { AppIntegrationType, AppType, IntegrationType } from '../../types/app';
|
||||
import { AreaType } from '../../types/area';
|
||||
import { CategoryType } from '../../types/category';
|
||||
import { ConfigType } from '../../types/config';
|
||||
import widgets from '../../widgets';
|
||||
import { IBitTorrent } from '../../widgets/bitTorrent/BitTorrentTile';
|
||||
import { IDashDotTile } from '../../widgets/dashDot/DashDotTile';
|
||||
import { IDateWidget } from '../../widgets/date/DateTile';
|
||||
|
||||
Reference in New Issue
Block a user