2024-05-15 20:53:00 +02:00
|
|
|
defmodule FreediveWeb.LiliformLive do
|
2024-05-15 23:59:20 +02:00
|
|
|
defmacro __using__(opts) do
|
|
|
|
quote location: :keep, bind_quoted: [opts: opts] do
|
2024-05-15 22:18:55 +02:00
|
|
|
use FreediveWeb, :live_view
|
2024-05-15 23:59:20 +02:00
|
|
|
@behaviour FreediveWeb.LiliformLive
|
|
|
|
|
|
|
|
def mount(_params, _session, socket) do
|
|
|
|
socket = assign(socket, :opts, unquote(opts))
|
|
|
|
socket = assign(socket, :items, items())
|
|
|
|
{:ok, socket}
|
|
|
|
end
|
2024-05-15 22:18:55 +02:00
|
|
|
end
|
2024-05-15 20:53:00 +02:00
|
|
|
end
|
2024-05-15 23:59:20 +02:00
|
|
|
|
|
|
|
@callback items() :: [map]
|
2024-05-15 20:53:00 +02:00
|
|
|
end
|