Skip to content

Commit 8755d47

Browse files
committed
Remove unused aliases
1 parent 4c8d39c commit 8755d47

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

lib/components_guide_web/templates/graphics/postage_stamp_live.ex

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
defmodule ComponentsGuideWeb.Graphics.Live.PostageStamp do
22
use ComponentsGuideWeb, :live_view
33

4-
alias ComponentsGuideWeb.StylingHelpers
5-
64
defmodule State do
75
defstruct primary: "Primary", secondary: "Secondary", width: 400, height: 400, center_y: false, center_x: true
86

@@ -19,11 +17,11 @@ defmodule ComponentsGuideWeb.Graphics.Live.PostageStamp do
1917
def change_primary(%State{} = state, primary) do
2018
put_in(state.primary, primary)
2119
end
22-
20+
2321
def change_secondary(%State{} = state, secondary) do
2422
put_in(state.secondary, secondary)
2523
end
26-
24+
2725
def change_center_y(%State{} = state, center_y) when is_boolean(center_y) do
2826
put_in(state.center_y, center_y)
2927
end
@@ -35,7 +33,7 @@ defmodule ComponentsGuideWeb.Graphics.Live.PostageStamp do
3533

3634
def render(assigns) do
3735
url = assigns.state |> State.to_url()
38-
36+
3937
~L"""
4038
<form phx-change=change>
4139
@@ -50,7 +48,7 @@ defmodule ComponentsGuideWeb.Graphics.Live.PostageStamp do
5048
<span class="font-bold text-purple-400 mr-2">Secondary</span>
5149
<input name=secondary type=text value="<%= @state.secondary %>" class="text-black text-purple-900 bg-purple-100 px-2">
5250
</label>
53-
51+
5452
<output>
5553
<img src="<%= url |> URI.to_string() %>" width="<%= @state.width %>" height="<%= @state.height %>">
5654
<a class="inline-block px-2 bg-blue-500 rounded-full" href="<%= url |> URI.to_string() %>">Link to image</a>
@@ -71,7 +69,7 @@ defmodule ComponentsGuideWeb.Graphics.Live.PostageStamp do
7169
socket
7270
) do
7371
IO.inspect(changes)
74-
72+
7573
state =
7674
socket.assigns.state
7775
|> State.change_primary(primary)

lib/components_guide_web/templates/web_standards/http_caching_live.ex

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
defmodule ComponentsGuideWeb.WebStandards.Live.HttpCaching do
22
use ComponentsGuideWeb, :live_view
3-
alias ComponentsGuideWeb.StylingHelpers
4-
3+
54
defmodule State do
65
defstruct local: nil, remote: nil
76
end
@@ -26,22 +25,22 @@ defmodule ComponentsGuideWeb.WebStandards.Live.HttpCaching do
2625
</form>
2726
"""
2827
end
29-
28+
3029
def handle_event("change", %{"local" => local}, socket) do
3130
state = socket.assigns.state
3231
state = put_in(state.local, local)
33-
32+
3433
{
3534
:noreply,
3635
socket
3736
|> assign(:state, state)
3837
}
3938
end
40-
39+
4140
def handle_event("change", %{"remote" => remote}, socket) do
4241
state = socket.assigns.state
4342
state = put_in(state.remote, remote)
44-
43+
4544
{
4645
:noreply,
4746
socket

lib/components_guide_web/templates/web_standards/url_live.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
defmodule ComponentsGuideWeb.WebStandards.Live.URL do
22
use ComponentsGuideWeb, :live_view
33

4-
alias ComponentsGuideWeb.StylingHelpers
5-
64
defmodule State do
75
defstruct raw_url: "https://example.org/songs?first=20&sortBy=releaseDate"
86

0 commit comments

Comments
 (0)