shellphone.app/app/core/hooks/use-current-customer.ts

12 lines
334 B
TypeScript
Raw Normal View History

2021-07-31 14:33:18 +00:00
import { useQuery } from "blitz"
import getCurrentCustomer from "../../customers/queries/get-current-customer"
export default function useCurrentCustomer() {
const [customer] = useQuery(getCurrentCustomer, null)
return {
customer,
hasCompletedOnboarding: Boolean(!!customer && customer.accountSid && customer.authToken),
}
}