profile refactor
This commit is contained in:
@@ -13,7 +13,9 @@ export function useWalletBalance(chain: Chain) {
|
||||
return useQuery({
|
||||
queryKey: ['wallet', 'balance', chain, isLegal ? 'org' : 'self'],
|
||||
queryFn: isLegal ? () => getOrgWalletBalance(chain) : () => getWalletBalance(chain),
|
||||
enabled: isLegal ? ready : true,
|
||||
// Wait for `me` before firing: otherwise a legal_entity account would hit
|
||||
// the cryptowallet endpoint during the brief window before account_type is known.
|
||||
enabled: ready,
|
||||
staleTime: 30_000,
|
||||
})
|
||||
}
|
||||
@@ -48,7 +50,7 @@ export function useWalletAddresses() {
|
||||
return useQuery({
|
||||
queryKey: ['wallet', 'addresses', isLegal ? 'org' : 'self'],
|
||||
queryFn: isLegal ? getOrgWalletAddresses : getWalletAddresses,
|
||||
enabled: isLegal ? ready : true,
|
||||
enabled: ready,
|
||||
staleTime: 10 * 60 * 1000,
|
||||
})
|
||||
}
|
||||
@@ -58,7 +60,7 @@ export function usePortfolio() {
|
||||
return useQuery({
|
||||
queryKey: ['wallet', 'portfolio', isLegal ? 'org' : 'self'],
|
||||
queryFn: isLegal ? getOrgPortfolio : getPortfolio,
|
||||
enabled: isLegal ? ready : true,
|
||||
enabled: ready,
|
||||
staleTime: 30_000,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
.page {
|
||||
position: relative;
|
||||
min-height: 70vh;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 80px 20px;
|
||||
/* extra top padding clears the fixed header overlay */
|
||||
padding: 120px 20px 80px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user