Skip to content

Commit

Permalink
remove unneeded arg
Browse files Browse the repository at this point in the history
  • Loading branch information
yhattav committed Dec 2, 2024
1 parent 0460baf commit 7d2992e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/CustomCursor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const CustomCursor: React.FC<CustomCursorProps> = React.memo(
}) => {
const { position, setPosition, targetPosition, isVisible } =
useMousePosition(containerRef, offsetX, offsetY);
useSmoothAnimation(position, targetPosition, smoothFactor, setPosition);
useSmoothAnimation(targetPosition, smoothFactor, setPosition);

const [portalContainer, setPortalContainer] =
React.useState<HTMLElement | null>(null);
Expand Down
3 changes: 1 addition & 2 deletions src/hooks/useSmoothAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { Position, TargetPosition } from '../types';
const SMOOTHING_THRESHOLD = 0.1;

export function useSmoothAnimation(
position: Position,
targetPosition: TargetPosition,
smoothFactor: number,
setPosition: React.Dispatch<React.SetStateAction<Position>>
) {
): void {
// Memoize the smoothing calculation
const calculateNewPosition = useCallback(
(currentPosition: Position) => {
Expand Down

0 comments on commit 7d2992e

Please sign in to comment.