Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
vin0401 committed Dec 10, 2024
1 parent cf92621 commit 982f8a3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const DragAndDropInfoContext = createContext<IDragAndDropInfoContext>({

export const DragAndDropContextProvider = ({ children }: { children: ReactNode }): React.JSX.Element => {
const [info, setInfo] = React.useState<DragAndDropInfo>(defaultInfo)
// const [draggedElement, setDraggedElement] = React.useState<React.ReactNode>(null)
const callbackRegistry = useRef<ICallbackRegistry>(new CallbackRegistry())
const isSortableInfo = Object.keys(info).includes('sortable')
const collisionDetection = isSortableInfo ? closestCorners : boundingRectIntersection
Expand All @@ -70,8 +69,6 @@ export const DragAndDropContextProvider = ({ children }: { children: ReactNode }
function onDragStart (event: DragStartEvent): void {
const data = event.active.data.current as DragAndDropInfo
setContext(data)

console.log('start', event)
}

function onDragCancel (): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export const ImageGalleryImagePreview = ({ item, index, value, setValue }: Image
return ((info.type === 'asset' && info.data.type === 'image')) || info.type === 'unknown'
} }
onDrop={ (info: DragAndDropInfo) => {
console.log('drop', info)
const newValue = [...value]
newValue[index] = { image: { type: 'asset', id: info.data.id as number } }
setValue(newValue)
Expand Down

0 comments on commit 982f8a3

Please sign in to comment.