feat(convert,assets): convert page route and assets portfolio chart
Add convert mobile/desktop views and assets chart from price history; polish calculator and wallet/home integration. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import {
|
||||
computed,
|
||||
inject,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
provide,
|
||||
ref,
|
||||
type ComputedRef,
|
||||
@@ -144,14 +146,14 @@ export function useCopperConvertPage() {
|
||||
}
|
||||
}
|
||||
|
||||
async function refreshLivePrices() {
|
||||
onMounted(() => {
|
||||
startLastPricePolling()
|
||||
await loadCatalog()
|
||||
}
|
||||
void loadCatalog()
|
||||
})
|
||||
|
||||
function stopLivePrices() {
|
||||
onUnmounted(() => {
|
||||
stopLastPricePolling()
|
||||
}
|
||||
})
|
||||
|
||||
const ctx: CopperConvertPageContext = {
|
||||
loading,
|
||||
@@ -163,7 +165,7 @@ export function useCopperConvertPage() {
|
||||
}
|
||||
|
||||
provide(COPPER_CONVERT_PAGE_KEY, ctx)
|
||||
return { ...ctx, refreshLivePrices, stopLivePrices, loadCatalog }
|
||||
return ctx
|
||||
}
|
||||
|
||||
export function useCopperConvertPageContext() {
|
||||
|
||||
Reference in New Issue
Block a user