diff --git a/src/app/(dashboard)/page.tsx b/src/app/(dashboard)/page.tsx index 767e670..10dfd5c 100644 --- a/src/app/(dashboard)/page.tsx +++ b/src/app/(dashboard)/page.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { createContext, Dispatch, ReactNode, SetStateAction, useContext, useRef, useState } from "react"; +import React, { createContext, Dispatch, ReactNode, SetStateAction, useContext, useState } from "react"; import { useLiveQuery } from "dexie-react-hooks"; import { addProject, db, deleteProject } from "@/lib/db"; import { Label } from "@/components/ui/label"; diff --git a/src/components/swipe-to-delete/SwipeToDelete.tsx b/src/components/swipe-to-delete/SwipeToDelete.tsx index bb77f88..c7d63ef 100644 --- a/src/components/swipe-to-delete/SwipeToDelete.tsx +++ b/src/components/swipe-to-delete/SwipeToDelete.tsx @@ -93,7 +93,7 @@ const SwipeToDelete: FC = ({ lastYRef.current = pageY; const raw = pageX - startX; - let x = dragX < 0 ? rubber(raw) : rubber(raw, width * 0.1); + const x = dragX < 0 ? rubber(raw) : rubber(raw, width * 0.1); if ((Math.abs(dragX) === 0 ? Math.abs(vY) < window.innerHeight * 0.05 && Math.abs(vX) > Math.abs(vY) : true)) { if (x < -1) setAllowOverscroll(true); if (x <= 0 || (allowOverscroll && x >= 0)) {