fix: Post-purchase holder dashboard on landing page (#150)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
058451792f
commit
e89fd4013d
11 changed files with 779 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import { RouterLink } from 'vue-router';
|
||||
import { useAccount } from '@harb/web3';
|
||||
|
||||
const { address, isConnected } = useAccount();
|
||||
|
|
@ -78,7 +79,7 @@ const pnlPercent = computed(() => {
|
|||
|
||||
const pnlClass = computed(() => (pnlPercent.value >= 0 ? 'positive' : 'negative'));
|
||||
|
||||
const appUrl = computed(() => `/app/wallet/${address.value}`);
|
||||
const walletRoute = computed(() => ({ name: 'wallet', params: { address: address.value } }));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -87,7 +88,7 @@ const appUrl = computed(() => `/app/wallet/${address.value}`);
|
|||
<div v-if="avgCost > 0" class="wallet-card__pnl">
|
||||
{{ pnlPercent >= 0 ? '+' : '' }}{{ pnlPercent.toFixed(1) }}%
|
||||
</div>
|
||||
<a :href="appUrl" class="wallet-card__link">View Dashboard →</a>
|
||||
<RouterLink :to="walletRoute" class="wallet-card__link">View Dashboard →</RouterLink>
|
||||
</div>
|
||||
<div v-else-if="isConnected && !loading && !hasPosition" class="wallet-card wallet-card--empty">
|
||||
<span>No KRK yet</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue