-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into team-repos-list
- Loading branch information
Showing
10 changed files
with
374 additions
and
132 deletions.
There are no files selected for viewing
63 changes: 38 additions & 25 deletions
63
src/pages/OwnerPage/Header/HeaderBanners/ExceededUploadsAlert/ExceededUploadsAlert.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
import { useParams } from 'react-router-dom' | ||
|
||
import { usePlanData } from 'services/account' | ||
import A from 'ui/A' | ||
import Banner from 'ui/Banner' | ||
import BannerContent from 'ui/Banner/BannerContent' | ||
import BannerHeading from 'ui/Banner/BannerHeading' | ||
import Button from 'ui/Button' | ||
|
||
const ExceededUploadsAlert = () => ( | ||
<Banner> | ||
<BannerHeading> | ||
<h2 className="font-semibold">Upload limit has been reached</h2> | ||
</BannerHeading> | ||
<BannerContent> | ||
<p> | ||
This org is currently on the free plan; which includes 250 free uploads | ||
monthly. This month's period has been reached and the reports will | ||
not generate. To resolve this,{' '} | ||
<A to={{ pageName: 'upgradeOrgPlan' }}>upgrade plan</A> and you'll | ||
have unlimited uploads. | ||
</p> | ||
<div className="my-6 w-36"> | ||
<Button to={{ pageName: 'upgradeOrgPlan' }} variant="primary"> | ||
Upgrade plan | ||
</Button> | ||
</div> | ||
<p> | ||
<span className="font-semibold">Need help?</span> Connect with our sales | ||
team today at <A to={{ pageName: 'sales' }}>sales@codecov.io</A> | ||
</p> | ||
</BannerContent> | ||
</Banner> | ||
) | ||
const ExceededUploadsAlert = () => { | ||
const { owner, provider } = useParams() | ||
const { data: planData } = usePlanData({ | ||
provider, | ||
owner, | ||
}) | ||
|
||
const planName = planData?.plan.marketingName | ||
const monthlyUploadLimit = planData?.plan.monthlyUploadLimit | ||
return ( | ||
<Banner> | ||
<BannerHeading> | ||
<h2 className="font-semibold">Upload limit has been reached</h2> | ||
</BannerHeading> | ||
<BannerContent> | ||
<p> | ||
This org is currently on the {planName} plan; which includes{' '} | ||
{monthlyUploadLimit} free uploads monthly. This month's limit has | ||
been reached and the reports will not generate. To resolve this,{' '} | ||
<A to={{ pageName: 'upgradeOrgPlan' }}>upgrade plan</A> and | ||
you'll have unlimited uploads. | ||
</p> | ||
<div className="my-6 w-36"> | ||
<Button to={{ pageName: 'upgradeOrgPlan' }} variant="primary"> | ||
Upgrade plan | ||
</Button> | ||
</div> | ||
<p> | ||
<span className="font-semibold">Need help?</span> Connect with our | ||
sales team today at <A to={{ pageName: 'sales' }}>sales@codecov.io</A> | ||
</p> | ||
</BannerContent> | ||
</Banner> | ||
) | ||
} | ||
|
||
export default ExceededUploadsAlert |
84 changes: 77 additions & 7 deletions
84
src/pages/OwnerPage/Header/HeaderBanners/ExceededUploadsAlert/ExceededUploadsAlert.spec.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.