fix(lobby): wallet Withdraw quick action lands on the Withdraw tab#28
Merged
Conversation
The lobby's Withdraw quick action used to share the same callback as
Deposit, so tapping it landed on the wallet's default Deposit tab.
* Route.Wallet now carries an optional `?tab={tab}` query arg plus
a `defaultPath` field so bottom-nav + generic navigation still
target plain "wallet" without dragging the placeholder along.
* WalletScreen accepts an `initialTab` param that seeds the
`rememberSaveable` tab state.
* StackNavHost registers the wallet composable with the nullable
arg, parses it back into WalletTab, and forwards it.
* LobbyScreen exposes a dedicated `onOpenWallet(initialTab)` so
the two quick action cards can deep-link independently:
Deposit -> "Deposit", Withdraw -> "Withdraw".
* StackApp + LobbyScreen's generic navigate lambdas now route via
`route.defaultPath` so adding parametric query args to other
routes later does not require touching every call site.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Route.Walletand landed on the wallet's default Deposit tab. The mockup carries the target viadata-wallet-tabon each button — this PR ports that hint into the navigation layer.How
Route.Walletnow declares the route pattern aswallet?tab={tab}plus adefaultPath = "wallet"so the bottom nav and other generic call sites still navigate to the bare path.Route.Wallet.build(tab)formats the deep-link string when a tab is supplied.WalletScreentakes aninitialTab: WalletTab = WalletTab.Depositparam and seeds the existingrememberSaveablefrom it.StackNavHostregisters the wallet composable with a nullabletabarg, parses it back into the enum (falls back to Deposit on unknown values) and forwards it to the screen.LobbyScreenexposes a newonOpenWallet(initialTab: String?)callback; the Deposit and Withdraw quick actions wire to it with"Deposit"and"Withdraw"respectively. Other navigations (FAB, games, view-all) keep going through the genericonNavigate(Route).onNavigatelambdas inStackApp+StackNavHostnow useroute.defaultPathso future parametric routes do not need to touch every call site.Test plan