Skip to content

Commit

Permalink
Merge pull request #41 from jetstreamapp/hide-donation
Browse files Browse the repository at this point in the history
Hide Donate Button
  • Loading branch information
paustint authored Jan 21, 2023
2 parents b835442 + 9ffd0a8 commit ecac5a7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export const HeaderDonatePopover: FunctionComponent<HeaderDonatePopoverProps> =
popoverRef.current.close();
}

if (!process.env.NX_SHOW_DONATION) {
return null;
}

return (
<Popover
ref={popoverRef}
Expand Down
20 changes: 11 additions & 9 deletions apps/jetstream/src/app/components/feedback/FeedbackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ export const FeedbackForm: FunctionComponent<FeedbackFormProps> = () => {
<hr />
<div>
<p>Jetstream is an open source project and is paid for and supported by volunteers.</p>
<a
href="https://github.com/sponsors/jetstreamapp"
className="slds-button slds-button_brand slds-m-top_medium"
target="_blank"
rel="noreferrer"
>
<Icon type="custom" icon="heart" className="slds-button__icon slds-m-right_x-small" omitContainer />
Become a sponsor or make a donation
</a>
{process.env.NX_SHOW_DONATION && (
<a
href="https://github.com/sponsors/jetstreamapp"
className="slds-button slds-button_brand slds-m-top_medium"
target="_blank"
rel="noreferrer"
>
<Icon type="custom" icon="heart" className="slds-button__icon slds-m-right_x-small" omitContainer />
Become a sponsor or make a donation
</a>
)}
</div>
</Grid>
</Card>
Expand Down
28 changes: 16 additions & 12 deletions apps/landing/components/new/HeaderCta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@ export const HeaderCta = () => (
<p className="text-base text-gray-300 sm:text-xl lg:text-lg xl:text-xl">
Jetstream is open source and <span className="underline">free to use</span>.
</p>
<p className="text-base text-gray-300 sm:text-xl lg:text-lg xl:text-xl">
Costs are covered by the developer - donations and sponsorships are greatly appreciated via Github sponsors.
</p>
<a
href="https://github.com/sponsors/jetstreamapp"
className="mt-6 inline-flex items-center py-3 px-4 rounded-md shadow bg-cyan-600 text-white font-medium hover:from-teal-600 hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-400 focus:ring-offset-gray-900"
target="_blank"
rel="noreferrer"
>
<HeartIcon className="-ml-0.5 mr-2 h-4 w-4" aria-hidden="true" />
Donate to the project
</a>
{process.env.NX_SHOW_DONATION && (
<>
<p className="text-base text-gray-300 sm:text-xl lg:text-lg xl:text-xl">
Costs are covered by the developer - donations and sponsorships are greatly appreciated via Github sponsors.
</p>
<a
href="https://github.com/sponsors/jetstreamapp"
className="mt-6 inline-flex items-center py-3 px-4 rounded-md shadow bg-cyan-600 text-white font-medium hover:from-teal-600 hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-400 focus:ring-offset-gray-900"
target="_blank"
rel="noreferrer"
>
<HeartIcon className="-ml-0.5 mr-2 h-4 w-4" aria-hidden="true" />
Donate to the project
</a>
</>
)}
</div>
</div>
</div>
Expand Down

0 comments on commit ecac5a7

Please sign in to comment.