mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 21:36:10 +02:00
🐛 Fix issue with recent files not showing
This commit is contained in:
parent
993530dbcb
commit
7d68d79fc3
3 changed files with 10 additions and 6 deletions
|
@ -256,14 +256,17 @@
|
|||
itemsize 290
|
||||
ratio (if (some? @width) (/ @width itemsize) 0)
|
||||
nitems (mth/floor ratio)
|
||||
limit (if (and (some? @width)
|
||||
(> (* itemsize (count files)) @width)
|
||||
(< (- ratio nitems) 0.51))
|
||||
(dec nitems) ;; Leave space for the "show all" block
|
||||
nitems)
|
||||
limit (min 10 ;; Configuration in backend to return recent files
|
||||
(if (and (some? @width)
|
||||
(> (* itemsize (count files)) @width)
|
||||
(< (- ratio nitems) 0.51))
|
||||
(dec nitems) ;; Leave space for the "show all" block
|
||||
nitems))
|
||||
|
||||
limit (if dragging?
|
||||
(dec limit)
|
||||
limit)
|
||||
|
||||
limit (max 1 limit)]
|
||||
|
||||
(mf/use-effect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue