feat: switch to phoenix liveview
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
12
priv/ui/live.js
Normal file
12
priv/ui/live.js
Normal file
@@ -0,0 +1,12 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const csrfToken = document
|
||||
.querySelector("meta[name='csrf-token']")
|
||||
.getAttribute("content");
|
||||
|
||||
const liveSocket = new LiveView.LiveSocket("/live", Phoenix.Socket, {
|
||||
params: { _csrf_token: csrfToken }
|
||||
});
|
||||
|
||||
liveSocket.connect();
|
||||
window.liveSocket = liveSocket;
|
||||
});
|
||||
Reference in New Issue
Block a user