We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bccf5d4 commit eb7d9bcCopy full SHA for eb7d9bc
src/ChessboardProvider.tsx
@@ -312,6 +312,9 @@ export function ChessboardProvider({
312
// the animation timeout whilst waiting for animation to complete
313
const animationTimeoutRef = useRef<NodeJS.Timeout | null>(null);
314
315
+ // unique id for dnd context, we need this to prevent hydration issues
316
+ const dndId = `dnd-${id}`;
317
+
318
// if the position changes, we need to recreate the pieces array
319
useEffect(() => {
320
const newPosition =
@@ -681,6 +684,7 @@ export function ChessboardProvider({
681
684
onDragEnd={handleDragEnd}
682
685
onDragCancel={handleDragCancel}
683
686
sensors={sensors}
687
+ id={dndId}
688
>
689
{children}
690
</DndContext>
0 commit comments