I end up having to do this:
defmodule AppWeb.Components.TermsOfUse do
@moduledoc """
Common terms of user component rendering the
latest terms of use contract.
"""
use Phoenix.Component
def contract(assigns) do
~H"""
<div>
<p dir="ltr">
THIS IS A LEGAL AGREEMENT (“AGREEMENT” OR “TERMS OF USE”)
</p>
</div>
"""
end
end
# Then in my liveviews...
<%= AppWeb.Components.TermsOfUse.contract(true) %>
I don’t want to have any params on this function, I just want static content. Any tips?