Skip to content

Commit

Permalink
Small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ccali11 committed Nov 6, 2023
1 parent 32065b7 commit c78faab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/web/src/composables/breakdownMetrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ export default function useBreakdownMetrics() {
})

watch(user, async () => {
if (user.value) initializeBreakdownMetricsComposable()
else uninitializeBreakdownMetricsComposable()

if (user) {
if (user.value) {
initializeBreakdownMetricsComposable()
await refreshBreakdown()
} else {
uninitializeBreakdownMetricsComposable()
}

})

const currentStaked = ref<BreakdownAmount>({
Expand Down

0 comments on commit c78faab

Please sign in to comment.