berrypod/lib/simpleshop_theme_web/live/shop/cart.ex
jamey deea04885f restructure LiveView directories: admin/, shop/, auth/
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>
2026-02-12 00:16:32 +00:00

20 lines
438 B
Elixir

defmodule SimpleshopThemeWeb.Shop.Cart do
use SimpleshopThemeWeb, :live_view
alias SimpleshopTheme.Cart
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, :page_title, "Cart")}
end
@impl true
def render(assigns) do
assigns = assign(assigns, :cart_page_subtotal, Cart.calculate_subtotal(assigns.cart_items))
~H"""
<SimpleshopThemeWeb.PageTemplates.cart {assigns} />
"""
end
end