Consolidates admin_live/, theme_live/, provider_live/ into admin/ (with theme/ and providers/ subdirs). Renames shop_live/ to shop/ and user_live/ to auth/. Updates all module names, router refs, test files, CSS source paths, and dialyzer ignore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
546 B
Elixir
28 lines
546 B
Elixir
defmodule SimpleshopThemeWeb.Shop.Home do
|
|
use SimpleshopThemeWeb, :live_view
|
|
|
|
alias SimpleshopTheme.Theme.PreviewData
|
|
|
|
@impl true
|
|
def mount(_params, _session, socket) do
|
|
preview_data = %{
|
|
products: PreviewData.products(),
|
|
categories: PreviewData.categories()
|
|
}
|
|
|
|
socket =
|
|
socket
|
|
|> assign(:page_title, "Home")
|
|
|> assign(:preview_data, preview_data)
|
|
|
|
{:ok, socket}
|
|
end
|
|
|
|
@impl true
|
|
def render(assigns) do
|
|
~H"""
|
|
<SimpleshopThemeWeb.PageTemplates.home {assigns} />
|
|
"""
|
|
end
|
|
end
|