feat: add backpex (config, js hooks, deps, css, formatter)
This commit is contained in:
parent
b05cd7db77
commit
5d0e8b5f78
6 changed files with 31 additions and 12 deletions
|
|
@ -20,12 +20,14 @@ import "phoenix_html"
|
|||
// Establish Phoenix Socket and LiveView configuration.
|
||||
import {Socket} from "phoenix"
|
||||
import {LiveSocket} from "phoenix_live_view"
|
||||
import { Hooks as BackpexHooks } from 'backpex'
|
||||
import topbar from "../vendor/topbar"
|
||||
|
||||
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
||||
let liveSocket = new LiveSocket("/live", Socket, {
|
||||
longPollFallbackMs: 2500,
|
||||
params: {_csrf_token: csrfToken}
|
||||
params: {_csrf_token: csrfToken},
|
||||
hooks: {...BackpexHooks}
|
||||
})
|
||||
|
||||
// Show progress bar on live navigation and form submits
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue