Fixed issue with customer id

This commit is contained in:
Michael
2021-06-26 18:58:04 +02:00
parent 1b9613df88
commit e59a3cbf92
2 changed files with 8 additions and 5 deletions

View File

@@ -36,11 +36,13 @@ const Pricing = () => {
if (user) {
getSub().then((result) => setSub(result));
supabase
.from("profiles")
.select(`customerId`)
.from("subscriptions")
.select(`customer_id`)
.eq("id", user.id)
.single()
.then((result) => setCustomerId(result.data?.customerId));
.then((result) => {
setCustomerId(result.data?.customer_id);
});
}
}, [user]);