parent
3e443617e9
commit
eb5e1cf41d
@ -2,13 +2,7 @@ import Chart from "chart.js/auto"
|
|||||||
|
|
||||||
const ChampionWinRate = {
|
const ChampionWinRate = {
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log("mounted")
|
|
||||||
this.handleEvent("points", (event) => console.log("123"))
|
|
||||||
|
|
||||||
// this.props = { id: this.el.getAttribute("data-id") };
|
|
||||||
this.handleEvent("win-rate", ({ winRates }) => {
|
this.handleEvent("win-rate", ({ winRates }) => {
|
||||||
console.log(">>>>>>>")
|
|
||||||
console.log(winRates);
|
|
||||||
patches = winRates.map((winRate) => {
|
patches = winRates.map((winRate) => {
|
||||||
return winRate.patch_number
|
return winRate.patch_number
|
||||||
})
|
})
|
||||||
|
@ -76,7 +76,6 @@ defmodule LoLAnalyticsWeb.ChampionLive.Show do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def handle_async(:get_win_rates, {:ok, result}, socket) do
|
def handle_async(:get_win_rates, {:ok, result}, socket) do
|
||||||
IO.inspect(result)
|
|
||||||
{:noreply, push_event(socket, "win-rate", %{winRates: result})}
|
{:noreply, push_event(socket, "win-rate", %{winRates: result})}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user