File tree 1 file changed +9
-3
lines changed
lib/banchan_web/live/offering_live
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,22 @@ defmodule BanchanWeb.OfferingLive.Show do
31
31
32
32
alias BanchanWeb.StudioLive.Components.OfferingCard
33
33
34
+ @ impl true
35
+ def mount ( _params , _sess , socket ) do
36
+ socket =
37
+ assign ( socket , order_seed: get_connect_params ( socket ) [ "order_seed" ] || Prime . generate ( 16 ) )
38
+
39
+ { :ok , socket }
40
+ end
41
+
34
42
@ impl true
35
43
# credo:disable-for-next-line Credo.Check.Refactor.CyclomaticComplexity
36
44
def handle_params ( % { "offering_type" => offering_type } = params , _uri , socket ) do
37
45
if socket . assigns [ :offering ] do
38
46
Notifications . unsubscribe_from_offering_updates ( socket . assigns . offering )
39
47
end
40
48
41
- socket =
42
- assign_studio_defaults ( params , socket , false , true )
43
- |> assign ( order_seed: get_connect_params ( socket ) [ "order_seed" ] || Prime . generate ( 16 ) )
49
+ socket = assign_studio_defaults ( params , socket , false , true )
44
50
45
51
offering =
46
52
Offerings . get_offering_by_type! (
You can’t perform that action at this time.
0 commit comments