diff --git a/web/package.json b/web/package.json index 29e257a..1bf4348 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "list-together-pwa", - "version": "1.2.1", + "version": "1.2.2", "author": "Derek R. Sonnenberg ", "license": "MIT", "devDependencies": { diff --git a/web/src/components/list/ItemList.tsx b/web/src/components/list/ItemList.tsx index f1ccd6d..c37c7b6 100644 --- a/web/src/components/list/ItemList.tsx +++ b/web/src/components/list/ItemList.tsx @@ -35,13 +35,10 @@ export default function ItemList({ list, sortedItems }: ItemListProps) { const currentPrivileges = useCurrentPrivileges(); // TODO: Can we memoize `useSensors` to prevent rerendering. Getting useEffect console warnings when using `useSensors` with `useMemo`. - const pointerSensor = useSensor(PointerSensor, { - activationConstraint: { - distance: 0.01 - } - }); - const mouseSensor = useSensor(MouseSensor); - const touchSensor = useSensor(TouchSensor); + const options = { activationConstraint: { distance: 0.01 } }; + const pointerSensor = useSensor(PointerSensor, options); + const mouseSensor = useSensor(MouseSensor, options); + const touchSensor = useSensor(TouchSensor, options); const keyboardSensor = useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates });