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 12, 2024
1 parent 66e0ab6 commit 3b12630
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ const AuthenticatedNewCodyProSubscriptionPage: FunctionComponent<NewCodyProSubsc
!userCodyPlanLoading &&
!subscriptionQueryResult.isLoading &&
!userCodyPlanError &&
!subscriptionQueryResult.isError &&
subscription
(!addSeats || (!subscriptionQueryResult.isError && subscription))

return (
<Page className={classNames('d-flex flex-column')}>
Expand All @@ -104,9 +103,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 3b12630

Please sign in to comment.