Fix liliform callbacks

This commit is contained in:
Harshad Sharma 2024-05-16 19:33:26 +05:30
parent da68c1b631
commit a103b10e10

View file

@ -1,4 +1,8 @@
defmodule FreediveWeb.LiliformLive do
@callback items() :: map
@callback filters() :: [map]
@callback search(items :: map, query :: String.t()) :: map
defmacro __using__(opts) do
quote location: :keep, bind_quoted: [opts: opts] do
use FreediveWeb, :live_view
@ -110,10 +114,6 @@ defmodule FreediveWeb.LiliformLive do
end
end
@callback items() :: [map]
@callback filters() :: [map]
@callback search(items :: [map], query :: String.t()) :: [map]
def filter(items, key) do
case key do
:all ->