We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
READY
3..
defp apply_action(socket, :index, params) do sort_direction = String.to_existing_atom(params["sort"] || "desc") socket |> assign(:page_title, "Listing Posts") |> assign(:post, nil) |> assign(:current_tag, nil) |> assign(:sort_direction, sort_direction) |> stream(:posts, fetch_posts(nil, sort_direction), reset: true) end @impl true def handle_info({TyperWeb.PostLive.FormComponent, {:saved, post}}, socket) do {:noreply, stream_insert(socket, :posts, post)} end
Elapsed time: 0.0 seconds
Accept cookies to toggle multiplayer view