Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mirmirmirr committed Dec 3, 2024
1 parent a385588 commit 978b8eb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/pages/Availability.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export default function Availability() {

useEffect(() => {
const checkTouchDevice = () => {
setIsTouchDevice('ontouchstart' in window || navigator.maxTouchPoints > 0);
setIsTouchDevice(
'ontouchstart' in window || navigator.maxTouchPoints > 0
);
};
checkTouchDevice();
}, []);
Expand Down Expand Up @@ -705,8 +707,16 @@ export default function Availability() {
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
{...(!isTouchDevice && {
onMouseDown: (e) => handleMouseDown(row, currentPage * daysPerPage + column),
onMouseEnter: (e) => handleMouseEnter(row, currentPage * daysPerPage + column),
onMouseDown: (e) =>
handleMouseDown(
row,
currentPage * daysPerPage + column
),
onMouseEnter: (e) =>
handleMouseEnter(
row,
currentPage * daysPerPage + column
),
})}
></td>
))}
Expand Down

0 comments on commit 978b8eb

Please sign in to comment.