Skip to content

Commit

Permalink
Update to phoenix_live_view 0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Jun 26, 2023
1 parent 35366cc commit 683897d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions phoenix_live_view.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Application.put_env(:sample, Example.Endpoint,
Mix.install([
{:plug_cowboy, "~> 2.5"},
{:jason, "~> 1.0"},
{:phoenix, "~> 1.7.1", override: true},
{:phoenix_live_view, "~> 0.18.17"}
{:phoenix, "~> 1.7.0"},
{:phoenix_live_view, "~> 0.19.0"}
])

defmodule Example.ErrorView do
Expand All @@ -23,10 +23,13 @@ defmodule Example.HomeLive do
{:ok, assign(socket, :count, 0)}
end

defp phx_vsn, do: Application.spec(:phoenix, :vsn)
defp lv_vsn, do: Application.spec(:phoenix_live_view, :vsn)

def render("live.html", assigns) do
~H"""
<script src="https://cdn.jsdelivr.net/npm/phoenix@1.7.1/priv/static/phoenix.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/phoenix_live_view@0.18.17/priv/static/phoenix_live_view.min.js"></script>
<script src={"https://cdn.jsdelivr.net/npm/phoenix@#{phx_vsn()}/priv/static/phoenix.min.js"}></script>
<script src={"https://cdn.jsdelivr.net/npm/phoenix_live_view@#{lv_vsn()}/priv/static/phoenix_live_view.min.js"}></script>
<script>
let liveSocket = new window.LiveView.LiveSocket("/live", window.Phoenix.Socket)
liveSocket.connect()
Expand Down

0 comments on commit 683897d

Please sign in to comment.