diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-10-12 20:20:21 +0200 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-10-12 20:20:37 +0200 |
| commit | 9699a3c138cea094afc6da03ada0cdff5df0f1c1 (patch) | |
| tree | ed03f05cacbd921493bf3a1203fad37933fee233 /src/frontend/app/components/PullToRefresh.tsx | |
| parent | 4e6b3edb50e982b365660c9798d6091496d523b3 (diff) | |
Fix formatting
Diffstat (limited to 'src/frontend/app/components/PullToRefresh.tsx')
| -rw-r--r-- | src/frontend/app/components/PullToRefresh.tsx | 10 |
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> |
