aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/PullToRefresh.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/app/components/PullToRefresh.tsx')
-rw-r--r--src/frontend/app/components/PullToRefresh.tsx13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/frontend/app/components/PullToRefresh.tsx b/src/frontend/app/components/PullToRefresh.tsx
index b3abe86..2de1a4f 100644
--- a/src/frontend/app/components/PullToRefresh.tsx
+++ b/src/frontend/app/components/PullToRefresh.tsx
@@ -1,6 +1,6 @@
-import React, { useRef, useState, useEffect, useCallback } from "react";
import { motion, useMotionValue, useTransform } from "framer-motion";
import { RefreshCw } from "lucide-react";
+import React, { useCallback, useEffect, useRef, useState } from "react";
import "./PullToRefresh.css";
interface PullToRefreshProps {
@@ -26,15 +26,6 @@ export const PullToRefresh: React.FC<PullToRefreshProps> = ({
const scale = useTransform(y, [0, threshold], [0.5, 1]);
const rotate = useTransform(y, [0, threshold], [0, 180]);
- const isAtPageTop = useCallback(() => {
- const scrollTop =
- window.pageYOffset ||
- document.documentElement.scrollTop ||
- document.body.scrollTop ||
- 0;
- return scrollTop <= 10; // Increased tolerance to 10px
- }, []);
-
const handleTouchStart = useCallback(
(e: TouchEvent) => {
// Very strict check - must be at absolute top
@@ -160,7 +151,6 @@ export const PullToRefresh: React.FC<PullToRefreshProps> = ({
return (
<div className="pull-to-refresh-container" ref={containerRef}>
- {/* Simple indicator */}
{isPulling && (
<motion.div className="pull-to-refresh-indicator" style={{ opacity }}>
<motion.div
@@ -174,7 +164,6 @@ export const PullToRefresh: React.FC<PullToRefreshProps> = ({
</motion.div>
)}
- {/* Normal content - no transform interference */}
<div className="pull-to-refresh-content">{children}</div>
</div>
);