diff --git a/assets/package.json b/assets/package.json index eb434881a9..84b196bfc5 100644 --- a/assets/package.json +++ b/assets/package.json @@ -4,7 +4,7 @@ "scripts": { "deploy": "webpack --mode production", "watch": "webpack --mode development --watch", - "build:dev": "webpack --progress --colors --watch", + "build:dev": "webpack --mode development --progress --colors", "build:prod": "NODE_ENV=production webpack --progress --colors -p" }, "dependencies": { diff --git a/config/dev.exs b/config/dev.exs index 481e720a06..ec35e6a004 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -19,9 +19,9 @@ config :sanbase, SanbaseWeb.Endpoint, "node_modules/webpack/bin/webpack.js", "--mode", "development", + "--watch", "--watch-stdin", - "--display", - "errors-only", + "--color", cd: Path.expand("../assets", __DIR__) ] ] diff --git a/lib/sanbase_web/live/monitored_twitter_handle_live/index.ex b/lib/sanbase_web/live/monitored_twitter_handle_live/index.ex index 622f47d232..023c696347 100644 --- a/lib/sanbase_web/live/monitored_twitter_handle_live/index.ex +++ b/lib/sanbase_web/live/monitored_twitter_handle_live/index.ex @@ -11,6 +11,9 @@ defmodule SanbaseWeb.MonitoredTwitterHandleLive.Index do <:col :let={row} label="Notes"><%= row.notes %> <:action :let={row}> + <.button phx-click={JS.push("approve", value: %{id: row.id})}> + Approve + <.button phx-click={JS.push("decline", value: %{id: row.id})}> Decline @@ -28,13 +31,11 @@ defmodule SanbaseWeb.MonitoredTwitterHandleLive.Index do @impl true def handle_event("approve", %{"id" => id}, socket) do - IO.inspect("GOT EVENT") {:noreply, socket} end @impl true def handle_event("decline", %{"id" => id}, socket) do - IO.inspect("GOT EVENT") {:noreply, socket} end