aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/PullToRefresh.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-11-30 20:49:48 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-11-30 20:49:48 +0100
commita68ba30716062b265f85c4be078a736c7135d7bc (patch)
treedd079a2d3860349402ad5b614659fedcb90c2b99 /src/frontend/app/components/PullToRefresh.tsx
parentcee521142a4e0673b155d97c3e4825b7fec1987f (diff)
Refactor StopMap and Settings components; replace region config usage with REGION_DATA, update StopDataProvider calls, and improve UI elements. Remove unused timetable files and add Tailwind CSS support.
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>
);