feat(chat): simplify socket response

Add helper methods to create the tuples `{:ok, socket}` and
`{:noreply, socket}`, and make them available in `SlaxWeb` module.
This commit is contained in:
2025-02-05 00:05:49 +00:00
parent 2063870a9e
commit 489be57db7
5 changed files with 72 additions and 64 deletions

View File

@@ -55,6 +55,8 @@ defmodule SlaxWeb do
use Phoenix.LiveView,
layout: {SlaxWeb.Layouts, :app}
import SlaxWeb.SocketHelpers, only: [ok: 1, noreply: 1]
unquote(html_helpers())
end
end