mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 09:25:47 +01:00
🚨 Fix compilation for types
This commit is contained in:
@@ -66,7 +66,7 @@ export function DndList({ data }: DndListProps) {
|
||||
return (
|
||||
<DragDropContext
|
||||
onDragEnd={({ destination, source }) =>
|
||||
handlers.reorder({ from: source.index, to: destination.index })
|
||||
handlers.reorder({ from: source.index, to: (destination && destination.index) ?? -1 })
|
||||
}
|
||||
>
|
||||
<Droppable droppableId="dnd-list" direction="vertical">
|
||||
|
||||
@@ -13,7 +13,6 @@ import { Grid } from '@mantine/core';
|
||||
import { SortableItem } from '../components/dnd/StorableItem';
|
||||
import { AppShelfItem } from '../components/AppShelf/AppShelf';
|
||||
import { useConfig } from '../tools/state';
|
||||
import { Config } from '../tools/types';
|
||||
|
||||
export default function App() {
|
||||
const [activeId, setActiveId] = useState(null);
|
||||
@@ -49,13 +48,13 @@ export default function App() {
|
||||
</DndContext>
|
||||
);
|
||||
|
||||
function handleDragStart(event) {
|
||||
function handleDragStart(event: any) {
|
||||
const { active } = event;
|
||||
|
||||
setActiveId(active.id);
|
||||
}
|
||||
|
||||
function handleDragEnd(event) {
|
||||
function handleDragEnd(event: any) {
|
||||
const { active, over } = event;
|
||||
|
||||
if (active.id !== over.id) {
|
||||
|
||||
Reference in New Issue
Block a user