defmodule MonoTab.IndexLayout do use Tableau.Layout, layout: MonoTab.RootLayout use Phoenix.Component def template(assigns) do ~H"""
{post[:description]}
<% end %>No posts found.
<% end %> """ end defp format_date(date_string) when is_binary(date_string) do case Date.from_iso8601(date_string) do {:ok, date} -> Calendar.strftime(date, "%B %d, %Y") {:error, _} -> date_string end end defp format_date(%Date{} = date), do: Calendar.strftime(date, "%B %d, %Y") defp format_date(_), do: "" end