[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
2024-04-17 10:22:55 -07:00
committed by GitHub
parent a4d5f45edc
commit aea40a3f92
7 changed files with 247 additions and 72 deletions
+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