Skip to content

Commit

Permalink
Fix LiveView import in app.js - app now runs in elixir 1.15 / OTP 26.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mreishus committed Nov 23, 2023
1 parent 19c1521 commit 2f71572
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/demon_spirit_web/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import "phoenix_html";
// import socket from "./socket"

import { Socket } from "phoenix";
import LiveSocket from "phoenix_live_view";

//import LiveSocket from "phoenix_live_view";
import * as LiveView from "phoenix_live_view";
const { LiveSocket } = LiveView;

let Hooks = {};

Expand Down Expand Up @@ -45,6 +48,6 @@ let csrfToken = document

let liveSocket = new LiveSocket("/live", Socket, {
hooks: Hooks,
params: { _csrf_token: csrfToken }
params: { _csrf_token: csrfToken },
});
liveSocket.connect();

0 comments on commit 2f71572

Please sign in to comment.