diff --git a/components/MyProfile.vue b/components/MyProfile.vue index f53821e..899790a 100644 --- a/components/MyProfile.vue +++ b/components/MyProfile.vue @@ -9,8 +9,14 @@

{{ props.displayName }}

- 現金と交換可能なトークン - {{ exchangeableToken }}pts + 獲得したビンゴトークン + {{ exchangeableToken + }}pts + {{ !props.walletAccount?.address ? "(付与前)" : "" }} +
@@ -33,6 +39,13 @@ >

{{ walletAddress }}

+

+ {{ hasPreGrantBingoTokenMessage }} +

@@ -73,10 +86,9 @@ const avatarImageURL = computed(() => { const exchangeableToken = computed(() => { if (!props.walletAccount?.address) { - return "???"; + return props.userInfo?.preGrantBingoToken ?? "0"; } - // トークン取得は未実装 - return props.bingoToken?.quantityOwned ?? "???"; + return props.bingoToken?.quantityOwned ?? "0"; }); const walletAddress = computed(() => { return ( @@ -84,6 +96,18 @@ const walletAddress = computed(() => { "接続されていません。ウォレットと接続してください" ); }); +const hasPreGrantBingoToken = computed(() => { + return ( + props.userInfo?.preGrantBingoToken && props.userInfo?.preGrantBingoToken > 0 + ); +}); +const hasPreGrantBingoTokenMessage = computed(() => { + return ( + `ウォレットと接続すると` + + props.userInfo?.preGrantBingoToken + + `pt付与されます!` + ); +});