diff --git a/packages/console/app/src/routes/workspace.tsx b/packages/console/app/src/routes/workspace.tsx index 74c3edb8..35323da2 100644 --- a/packages/console/app/src/routes/workspace.tsx +++ b/packages/console/app/src/routes/workspace.tsx @@ -19,7 +19,7 @@ const getUserEmail = query(async (workspaceID: string) => { export default function WorkspaceLayout(props: RouteSectionProps) { const params = useParams() - const userEmail = createAsync(() => getUserEmail(params.id)) + const userEmail = createAsync(() => getUserEmail(params.id!)) return (
diff --git a/packages/console/app/src/routes/workspace/[id].tsx b/packages/console/app/src/routes/workspace/[id].tsx index 327013aa..d81200b9 100644 --- a/packages/console/app/src/routes/workspace/[id].tsx +++ b/packages/console/app/src/routes/workspace/[id].tsx @@ -5,7 +5,7 @@ import "./[id].css" export default function WorkspaceLayout(props: RouteSectionProps) { const params = useParams() - const userInfo = createAsync(() => querySessionInfo(params.id)) + const userInfo = createAsync(() => querySessionInfo(params.id!)) return (
diff --git a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx index fe4e08b7..e8403f9a 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx @@ -27,7 +27,7 @@ const createSessionUrl = action(async (workspaceID: string, returnUrl: string) = export function BillingSection() { const params = useParams() // ORIGINAL CODE - COMMENTED OUT FOR TESTING - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) const checkoutAction = useAction(createCheckoutUrl) const checkoutSubmission = useSubmission(createCheckoutUrl) const sessionAction = useAction(createSessionUrl) @@ -51,7 +51,7 @@ export function BillingSection() { const amount = parseInt(store.addBalanceAmount) const baseUrl = window.location.href - const checkout = await checkoutAction(params.id, amount, baseUrl, baseUrl) + const checkout = await checkoutAction(params.id!, amount, baseUrl, baseUrl) if (checkout && checkout.data) { setStore("checkoutRedirecting", true) window.location.href = checkout.data @@ -60,7 +60,7 @@ export function BillingSection() { async function onClickSession() { const baseUrl = window.location.href - const sessionUrl = await sessionAction(params.id, baseUrl) + const sessionUrl = await sessionAction(params.id!, baseUrl) if (sessionUrl && sessionUrl.data) { setStore("sessionRedirecting", true) window.location.href = sessionUrl.data diff --git a/packages/console/app/src/routes/workspace/[id]/billing/index.tsx b/packages/console/app/src/routes/workspace/[id]/billing/index.tsx index f14dbffb..feb64651 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/index.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/index.tsx @@ -8,8 +8,8 @@ import { queryBillingInfo, querySessionInfo } from "../../common" export default function () { const params = useParams() - const userInfo = createAsync(() => querySessionInfo(params.id)) - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const userInfo = createAsync(() => querySessionInfo(params.id!)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) return (
diff --git a/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx index 77c01796..9eb4758a 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx @@ -30,7 +30,7 @@ export function MonthlyLimitSection() { const params = useParams() const submission = useSubmission(setMonthlyLimit) const [store, setStore] = createStore({ show: false }) - const billingInfo = createAsync(() => queryBillingInfo(params.id)) + const billingInfo = createAsync(() => queryBillingInfo(params.id!)) let input: HTMLInputElement diff --git a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx index 0fb2a0df..3712513b 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx @@ -19,7 +19,7 @@ const downloadReceipt = action(async (workspaceID: string, paymentID: string) => export function PaymentSection() { const params = useParams() - const payments = createAsync(() => getPaymentsInfo(params.id)) + const payments = createAsync(() => getPaymentsInfo(params.id!)) const downloadReceiptAction = useAction(downloadReceipt) // DUMMY DATA FOR TESTING @@ -89,7 +89,7 @@ export function PaymentSection() {