Skip to content

Commit ec230cf

Browse files
author
Jachin
committed
minor fixes
1 parent 2e76288 commit ec230cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: lib/demo_web/live/post_live/form_component.ex

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule DemoWeb.PostLive.FormComponent do
2222
<.input field={@form[:title]} type="text" label="Title" />
2323
<.input field={@form[:body]} type="text" label="Body" />
2424
<.input phx-hook="Datepicker" field={@form[:date_published]} type="text" placeholder="Select date" label="Date Published" />
25-
25+
2626
<:actions>
2727
<.button phx-disable-with="Saving...">Save Post</.button>
2828
</:actions>
@@ -81,7 +81,6 @@ defmodule DemoWeb.PostLive.FormComponent do
8181
|> push_patch(to: socket.assigns.patch)}
8282

8383
{:error, %Ecto.Changeset{} = changeset} ->
84-
IO.inspect changeset, label: "Changeset"
8584
{:noreply, assign_form(socket, changeset)}
8685
end
8786
end

Diff for: lib/demo_web/live/post_live/show.html.heex

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<:item title="Date published"><%= @post.date_published %></:item>
1515
</.list>
1616

17-
<.back navigate={~p"/posts"}>Back to posts</.back>
17+
<.back navigate={~p"/"}>Back to posts</.back>
18+
1819

1920
<.modal :if={@live_action == :edit} id="post-modal" show on_cancel={JS.patch(~p"/posts/#{@post}")}>
2021
<.live_component

0 commit comments

Comments
 (0)