mirror of
				https://github.com/hydralauncher/hydra.git
				synced 2025-03-09 15:40:26 +00:00 
			
		
		
		
	refactor: move formatNumber hook usage to before early return
This commit is contained in:
		
							parent
							
								
									85422837b0
								
							
						
					
					
						commit
						502f3b4aa7
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -13,6 +13,8 @@ export function Pagination({
 | 
				
			||||||
  totalPages,
 | 
					  totalPages,
 | 
				
			||||||
  onPageChange,
 | 
					  onPageChange,
 | 
				
			||||||
}: PaginationProps) {
 | 
					}: PaginationProps) {
 | 
				
			||||||
 | 
					  const { formatNumber } = useFormat();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (totalPages <= 1) return null;
 | 
					  if (totalPages <= 1) return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Number of visible pages
 | 
					  // Number of visible pages
 | 
				
			||||||
| 
						 | 
					@ -28,8 +30,6 @@ export function Pagination({
 | 
				
			||||||
    startPage = Math.max(1, endPage - visiblePages + 1);
 | 
					    startPage = Math.max(1, endPage - visiblePages + 1);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const { formatNumber } = useFormat();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <div
 | 
					    <div
 | 
				
			||||||
      style={{
 | 
					      style={{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue