Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Bug fix: page now loads for new subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
vdavid committed Jun 19, 2024
1 parent c5c1bb4 commit 5f644b9
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ const AuthenticatedNewCodyProSubscriptionPage: FunctionComponent<NewCodyProSubsc
!userCodyPlanLoading &&
!subscriptionQueryResult.isLoading &&
!userCodyPlanError &&
!subscriptionQueryResult.isError &&
subscription
(!addSeats || (!subscriptionQueryResult.isError && subscription))

return (
<Page className={classNames('d-flex flex-column', styles.page)}>
Expand All @@ -110,9 +109,11 @@ const AuthenticatedNewCodyProSubscriptionPage: FunctionComponent<NewCodyProSubsc

{userCodyPlanLoading || (subscriptionQueryResult.isLoading && <LoadingSpinner className="mx-auto" />)}

{!!userCodyPlanError && <Alert variant="danger">Failed to fetch subscription data</Alert>}
{subscriptionQueryResult.isError && <Alert variant="danger">Failed to fetch subscription data</Alert>}
{!subscription && <Alert variant="danger">Subscription data is not available</Alert>}
{!!userCodyPlanError && <Alert variant="danger">Failed to fetch user Cody plan data</Alert>}
{addSeats && subscriptionQueryResult.isError && (
<Alert variant="danger">Failed to fetch subscription data</Alert>
)}
{addSeats && !subscription && <Alert variant="danger">Subscription data is not available</Alert>}

{canDisplayPage && (
<CodyProApiClientContext.Provider value={defaultCodyProApiClientContext}>
Expand Down

0 comments on commit 5f644b9

Please sign in to comment.