aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/PullToRefresh.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-10-12 20:20:21 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-10-12 20:20:37 +0200
commit9699a3c138cea094afc6da03ada0cdff5df0f1c1 (patch)
treeed03f05cacbd921493bf3a1203fad37933fee233 /src/frontend/app/components/PullToRefresh.tsx
parent4e6b3edb50e982b365660c9798d6091496d523b3 (diff)
Fix formatting
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>