back home button on daily puzzle

This commit is contained in:
2026-11-06 19:51:27 +01:00
parent bf176ebd42
commit f5efcde5ca
3 changed files with 50 additions and 2 deletions
@@ -1,6 +1,7 @@
defmodule ChesstrainerWeb.EndgameLive.Play do
use ChesstrainerWeb, :live_view
alias Chesstrainer.Accounts.Scope
alias Chesstrainer.Endgames
alias ChesstrainerWeb.EndgameLive.PlayCore
alias ChesstrainerWeb.PlayComponents
@@ -32,9 +33,12 @@ defmodule ChesstrainerWeb.EndgameLive.Play do
</p>
</:subtitle>
<:actions>
<.button navigate={~p"/endgames"}>
<.button :if={Scope.premium?(@current_scope)} navigate={~p"/endgames"}>
<.icon name="hero-arrow-left" /> Back to endgames
</.button>
<.button :if={!Scope.premium?(@current_scope)} navigate={~p"/"}>
<.icon name="hero-arrow-left" /> Back home
</.button>
</:actions>
</.header>