Skip to content

Commit

Permalink
improve syntax
Browse files Browse the repository at this point in the history
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
  • Loading branch information
matiasbenedetto and t-hamano authored Feb 22, 2024
1 parent afd078a commit cbe80ce
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ function FontCollection( { slug } ) {

// NOTE: The height of the font library modal unavailable to use for rendering font family items is roughly 417px
// The height of each font family item is 61px.
const windowHeight =
window.innerHeight <= MIN_WINDOW_HEIGHT
? MIN_WINDOW_HEIGHT
: window.innerHeight;
const windowHeight = Math.max( window.innerHeight, MIN_WINDOW_HEIGHT );
const pageSize = Math.floor( ( windowHeight - 417 ) / 61 );
const totalPages = Math.ceil( fonts.length / pageSize );
const itemsStart = ( page - 1 ) * pageSize;
Expand Down

0 comments on commit cbe80ce

Please sign in to comment.