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.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/frontend/app/components/PullToRefresh.tsx b/src/frontend/app/components/PullToRefresh.tsx
index f8ea590..9def8f5 100644
--- a/src/frontend/app/components/PullToRefresh.tsx
+++ b/src/frontend/app/components/PullToRefresh.tsx
@@ -99,9 +99,9 @@ export const PullToRefresh: React.FC<PullToRefreshProps> = ({
const handleTouchEnd = useCallback(async () => {
if (!isPulling) return;
-
+
setIsPulling(false);
-
+
if (isActive && y.get() >= threshold && !isRefreshing) {
try {
await onRefresh();
@@ -109,7 +109,7 @@ export const PullToRefresh: React.FC<PullToRefreshProps> = ({
console.error('Refresh failed:', error);
}
}
-
+
// Always reset state
setIsActive(false);
y.set(0);
@@ -144,8 +144,8 @@ export const PullToRefresh: React.FC<PullToRefreshProps> = ({
className={`refresh-icon-container ${isActive ? 'active' : ''}`}
style={{ scale, rotate: isRefreshing ? 0 : rotate }}
>
- <RefreshCw
- className={`refresh-icon ${isRefreshing ? 'spinning' : ''}`}
+ <RefreshCw
+ className={`refresh-icon ${isRefreshing ? 'spinning' : ''}`}
/>
</motion.div>
</motion.div>