Код: Выделить всё
const getSubscription = async () => {
console.log(user.value) // this part is null
const profile = user.value?.profile
if (!profile) return null
const {data: subscriptionData } = await supabase
.from("organisation_subscriptions")
.select("current_subscription, state, agb_version, current_period_start, current_period_end")
.eq("organisation_id", profile.organisation_id)
.limit(1)
.single()
.throwOnError()
return subscriptionData
}
Подробнее здесь: https://stackoverflow.com/questions/795 ... e-beginnin
Мобильная версия