rename hasActiveSubscription
from useCurrentUser()
to hasOngoingSubscription
This commit is contained in:
@ -10,7 +10,7 @@ import { formatRelativeDate } from "app/core/helpers/date-formatter";
|
||||
import useCurrentUser from "app/core/hooks/use-current-user";
|
||||
|
||||
export default function PhoneCallsList() {
|
||||
const { hasActiveSubscription } = useCurrentUser();
|
||||
const { hasOngoingSubscription } = useCurrentUser();
|
||||
const [phoneCalls, query] = usePhoneCalls();
|
||||
|
||||
useEffect(() => {
|
||||
@ -25,7 +25,7 @@ export default function PhoneCallsList() {
|
||||
}
|
||||
|
||||
if (phoneCalls.length === 0) {
|
||||
return hasActiveSubscription ? <EmptyCalls /> : null;
|
||||
return hasOngoingSubscription ? <EmptyCalls /> : null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -11,7 +11,7 @@ import InactiveSubscription from "app/core/components/inactive-subscription";
|
||||
import PhoneCallsList from "../components/phone-calls-list";
|
||||
|
||||
const PhoneCalls: BlitzPage = () => {
|
||||
const { hasFilledTwilioCredentials, hasPhoneNumber, hasActiveSubscription } = useCurrentUser();
|
||||
const { hasFilledTwilioCredentials, hasPhoneNumber, hasOngoingSubscription } = useCurrentUser();
|
||||
|
||||
if (!hasFilledTwilioCredentials || !hasPhoneNumber) {
|
||||
return (
|
||||
@ -22,7 +22,7 @@ const PhoneCalls: BlitzPage = () => {
|
||||
);
|
||||
}
|
||||
|
||||
if (!hasActiveSubscription) {
|
||||
if (!hasOngoingSubscription) {
|
||||
return (
|
||||
<>
|
||||
<InactiveSubscription />
|
||||
|
@ -15,7 +15,7 @@ import useCurrentUser from "app/core/hooks/use-current-user";
|
||||
import KeypadErrorModal from "../components/keypad-error-modal";
|
||||
|
||||
const KeypadPage: BlitzPage = () => {
|
||||
const { hasFilledTwilioCredentials, hasPhoneNumber, hasActiveSubscription } = useCurrentUser();
|
||||
const { hasFilledTwilioCredentials, hasPhoneNumber, hasOngoingSubscription } = useCurrentUser();
|
||||
const router = useRouter();
|
||||
const [isKeypadErrorModalOpen, setIsKeypadErrorModalOpen] = useState(false);
|
||||
const [phoneCalls] = usePhoneCalls();
|
||||
@ -90,8 +90,10 @@ const KeypadPage: BlitzPage = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hasActiveSubscription) {
|
||||
if (!hasOngoingSubscription) {
|
||||
// TODO
|
||||
setIsKeypadErrorModalOpen(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (phoneNumber === "") {
|
||||
|
Reference in New Issue
Block a user