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:
@@ -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
|
||||
|
Reference in New Issue
Block a user