yesterday's homepage viz preview adjustment, so I can use it

92d2873 · gmorell · 2022-10-14 19:16

7 files +9 -2

Files changed

modified apps/room_sanctum/lib/room_sanctum_web/live/landing_live/index.ex
+9 −2
@@ -4,8 +4,15 @@ defmodule RoomSanctumWeb.LandingLive.Index do
4 4 alias RoomSanctum.Configuration
5 5
6 6 @impl true
7 − def mount(_params, _session, socket) do
8 − vision = Configuration.get_landing_vision()
7 + def mount(params, _session, socket) do
8 + vision = case params |> Map.get("viz") do
9 + nil -> Configuration.get_landing_vision()
10 + val -> case Configuration.get_vision(val) do
11 + nil -> Configuration.get_landing_vision()
12 + val -> val
13 + end
14 + end
15 +
9 16 if connected?(socket), do: Process.send_after(self(), :update, 100)
10 17 {
11 18 :ok,

Parents: 9aef95e