[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
@@ -0,0 +1,19 @@
defmodule Pinchflat.Utils.NumberUtilsTest do
use ExUnit.Case, async: true
alias Pinchflat.Utils.NumberUtils
describe "clamp/3" do
test "returns the minimum when the number is less than the minimum" do
assert NumberUtils.clamp(1, 2, 3) == 2
end
test "returns the maximum when the number is greater than the maximum" do
assert NumberUtils.clamp(4, 2, 3) == 3
end
test "returns the number when it is between the minimum and maximum" do
assert NumberUtils.clamp(2, 1, 3) == 2
end
end
end