mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-01-25 02:08:19 +00:00
issue 409, shoud not get Invoices in self-hosted system (#412)
This commit is contained in:
@@ -40,6 +40,7 @@ import {
|
||||
PlanType,
|
||||
USER_ACCOUNT,
|
||||
WEBHOOK_METHODS,
|
||||
STRIPE_PUBLISHABLE_KEY,
|
||||
} from "src/api/constants";
|
||||
import { MSG_REQUIRED_FIELDS, MSG_WEBHOOK_FIELDS } from "src/constants";
|
||||
|
||||
@@ -85,7 +86,10 @@ export const AccountForm = ({
|
||||
const user = useSelectState("user");
|
||||
const currentServiceProvider = useSelectState("currentServiceProvider");
|
||||
const [accounts] = useApiData<Account[]>("Accounts");
|
||||
const [invoice] = useApiData<Invoice>("Invoices");
|
||||
// Dont get Invoices if the environment is self-hosted
|
||||
const [invoice] = STRIPE_PUBLISHABLE_KEY
|
||||
? useApiData<Invoice>("Invoices")
|
||||
: [undefined];
|
||||
const [userData] = useApiData<CurrentUserData>("Users/me");
|
||||
const [userCarriers] = useApiData<Carrier[]>(`VoipCarriers`);
|
||||
const [userSpeechs] = useApiData<SpeechCredential[]>(
|
||||
|
||||
Reference in New Issue
Block a user