defmodule AshHqWeb.Components.Forum.Attachment do
@moduledoc "Renders an attachment"
use Surface.Component
prop(attachment, :any, required: true)
def render(assigns) do
~F"""
"""
end
defp video_type(path) do
mime = MIME.from_path(path)
case mime do
"image/" <> _ ->
{:image, mime}
"video/" <> _ ->
{:video, mime}
_ ->
{:other, mime}
end
end
end