<%= @network %> <%= @chan %>

<%= if Enum.empty?(@backlog) do %>

Disconnected

Oh no error

<% end %>
    <%= for message <- @backlog do %> <%= if is_map(message) && Map.get(message, :__struct__) == IRC.Message do %>
  • <%= message.sender.nick %>
  • <% end %> <%= if is_binary(message) do %>
  • <%= message %>
  • <% end %> <%= if is_map(message) && Map.get(message, :type) do %>
  • * * *
  • <% end %> <% end %>
<.form let={f} id={"form-#{@counter}"} for={:message} phx-submit="send" class="w-full px-4 pt-4">
<%= text_input f, :text, class: "focus:ring-indigo-500 focus:border-indigo-500 block w-full border rounded-md pl-4 sm:text-sm border-gray-300", autofocus: true, 'phx-hook': "AutoFocus", autocomplete: "off", placeholder: "Don't be shy, say something…" %> <%= submit content_tag(:span, "Send"), class: "-ml-px relative inline-flex items-center space-x-2 px-4 py-2 border border-gray-300 text-sm font-medium rounded-r-md text-gray-700 bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500"%>