Skip to content

Commit

Permalink
Fix csrf-token change
Browse files Browse the repository at this point in the history
  • Loading branch information
bcardarella committed Jan 30, 2025
1 parent ebaa67b commit e82cfb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/live_view_native/component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ defmodule LiveViewNative.Component do
use LiveViewNative.Component,
format: :swiftui
import LiveViewNative.Component, only: [csrf_token: 1]
import LiveViewNative.Component, only: [csrf_token: 2]
embed_templates "layouts_swiftui/*"
end
Expand Down
2 changes: 1 addition & 1 deletion priv/templates/lvn.gen.layout/root.neex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<.csrf_token />
<csrf-token value={Phoenix.Controller.get_csrf_token()}/>
<Style url={~p"/assets/app.<%= context.format %>.styles"} />
{@inner_content}
2 changes: 1 addition & 1 deletion priv/templates/lvn.gen/app_name_native.ex
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ defmodule <%= inspect context.native_module %> do
quote do
use LiveViewNative.Component, unquote(opts)

import LiveViewNative.Component, only: [csrf_token: 1]
import LiveViewNative.Component, only: [csrf_token: 2]

unquote(helpers(opts[:format]))
end
Expand Down

0 comments on commit e82cfb0

Please sign in to comment.