@@ -7,13 +7,14 @@ import { UiError } from '@workspace/ui/components/ui-error'
77import { UiIcon } from '@workspace/ui/components/ui-icon'
88import { UiLoader } from '@workspace/ui/components/ui-loader'
99import { UiNotFound } from '@workspace/ui/components/ui-not-found'
10- import { Link , useParams } from 'react-router'
10+ import { Link , useLocation , useParams } from 'react-router'
1111import { useSortAccounts } from './data-access/use-sort-accounts.tsx'
1212import { SettingsUiAccountTable } from './ui/settings-ui-account-table.tsx'
1313import { SettingsUiWalletItem } from './ui/settings-ui-wallet-item.tsx'
1414
1515export function SettingsFeatureWalletDetails ( ) {
1616 const { t } = useTranslation ( 'settings' )
17+ const { pathname : from } = useLocation ( )
1718 const { walletId } = useParams ( ) as { walletId : string }
1819 const { data : item , error, isError, isLoading } = useWalletFindUnique ( { id : walletId } )
1920 const accounts = useAccountLive ( { walletId } )
@@ -33,15 +34,16 @@ export function SettingsFeatureWalletDetails() {
3334 < UiCard
3435 backButtonTo = "/settings/wallets"
3536 title = {
36- < div className = "flex w-full items-center justify-between" >
37- < SettingsUiWalletItem item = { item } />
37+ < div className = "flex w-full items-center justify-between whitespace-nowrap" >
3838 < div className = "flex items-center gap-2" >
39- < Button asChild title = { t ( ( $ ) => $ . actionEditWallet ) } variant = "outline" >
40- < Link to = { `./edit` } >
39+ < SettingsUiWalletItem item = { item } />
40+ < Button asChild size = "icon" title = { t ( ( $ ) => $ . actionEditWallet ) } variant = "ghost" >
41+ < Link state = { { from } } to = { `./edit` } >
4142 < UiIcon className = "size-4" icon = "edit" />
42- { t ( ( $ ) => $ . actionEditWallet ) }
4343 </ Link >
4444 </ Button >
45+ </ div >
46+ < div className = "flex items-center gap-2" >
4547 < Button asChild title = { t ( ( $ ) => $ . actionEditWalletMessage ) } variant = "outline" >
4648 < Link to = { `./add` } >
4749 < UiIcon className = "size-4" icon = "add" />
@@ -52,7 +54,7 @@ export function SettingsFeatureWalletDetails() {
5254 </ div >
5355 }
5456 >
55- < div className = "space-y-6" >
57+ < div className = "space-y-2 md:space-y- 6" >
5658 < SettingsUiAccountTable items = { sorted } />
5759 </ div >
5860 </ UiCard >
0 commit comments