Fix subscription settings loading bug
This commit is contained in:
parent
10423fa5b3
commit
75e381e694
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="subscription-settings">
|
<div class="subscription-settings">
|
||||||
<div class="info" v-if="!isLoading">
|
<div class="info" v-if="subscriptionOptionLoaded">
|
||||||
<template v-if="subscriptionOption !== null">
|
<template v-if="subscriptionOption !== null">
|
||||||
<span>Subscriptions are enabled</span>
|
<span>Subscriptions are enabled</span>
|
||||||
<div class="price">
|
<div class="price">
|
||||||
|
@ -78,6 +78,7 @@ const {
|
||||||
|
|
||||||
let isLoading = $ref(false)
|
let isLoading = $ref(false)
|
||||||
let subscriptionOption = $ref<SubscriptionOption | null>(null)
|
let subscriptionOption = $ref<SubscriptionOption | null>(null)
|
||||||
|
let subscriptionOptionLoaded = $ref(false)
|
||||||
|
|
||||||
let subscriptionPrice = $ref(0.01)
|
let subscriptionPrice = $ref(0.01)
|
||||||
let subscriptionPayoutAddress = $ref("")
|
let subscriptionPayoutAddress = $ref("")
|
||||||
|
@ -94,6 +95,7 @@ async function loadSubscriptionSettings() {
|
||||||
subscriptionOption = subscriptionOptions.find((item) => {
|
subscriptionOption = subscriptionOptions.find((item) => {
|
||||||
return item.type === "monero"
|
return item.type === "monero"
|
||||||
}) || null
|
}) || null
|
||||||
|
subscriptionOptionLoaded = true
|
||||||
if (subscriptionOption?.price && subscriptionOption?.payout_address) {
|
if (subscriptionOption?.price && subscriptionOption?.payout_address) {
|
||||||
subscriptionPrice = getPricePerMonth(subscriptionOption.price)
|
subscriptionPrice = getPricePerMonth(subscriptionOption.price)
|
||||||
subscriptionPayoutAddress = subscriptionOption.payout_address
|
subscriptionPayoutAddress = subscriptionOption.payout_address
|
||||||
|
|
Loading…
Reference in a new issue