[Enhancement] Add pagination for a source's media (#190)

* [WIP] added first attempt at pagination component

* Hooked up pagination for downloaded media
This commit is contained in:
Kieran authored and GitHub committed 2024-04-17 10:22:55 -07:00
1 parent a4d5f45edc
commit aea40a3f92
7 files changed
+247 -72

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
defmodule Pinchflat.Utils.NumberUtils do
@moduledoc """
Utility methods for working with numbers
"""
@doc """
Clamps a number between a minimum and maximum value
Returns integer() | float()
"""
def clamp(num, minimum, maximum) do
num
|> max(minimum)
|> min(maximum)
end
end