feat(client): add Patreon button (#44113)
* feat(add): add patreon button * feat: add noreferrer * Apply suggestions from code review Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -85,12 +85,13 @@ const paypalConfigurator = (donationAmount, donationDuration, paypalConfig) => {
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
const donationUrls = {
|
||||
successUrl: 'https://www.freecodecamp.org/news/thank-you-for-donating/',
|
||||
cancelUrl: 'https://freecodecamp.org/donate'
|
||||
};
|
||||
|
||||
const patreonDefaultPledgeAmount = 500;
|
||||
|
||||
module.exports = {
|
||||
durationsConfig,
|
||||
amountsConfig,
|
||||
@@ -103,5 +104,6 @@ module.exports = {
|
||||
onetimeSKUConfig,
|
||||
paypalConfigTypes,
|
||||
paypalConfigurator,
|
||||
donationUrls
|
||||
donationUrls,
|
||||
patreonDefaultPledgeAmount
|
||||
};
|
||||
|
@@ -29,6 +29,7 @@ const {
|
||||
ALGOLIA_API_KEY: algoliaAPIKey,
|
||||
STRIPE_PUBLIC_KEY: stripePublicKey,
|
||||
PAYPAL_CLIENT_ID: paypalClientId,
|
||||
PATREON_CLIENT_ID: patreonClientId,
|
||||
DEPLOYMENT_ENV: deploymentEnv,
|
||||
SHOW_UPCOMING_CHANGES: showUpcomingChanges
|
||||
} = process.env;
|
||||
@@ -65,5 +66,9 @@ module.exports = Object.assign(locations, {
|
||||
!paypalClientId || paypalClientId === 'id_from_paypal_dashboard'
|
||||
? null
|
||||
: paypalClientId,
|
||||
patreonClientId:
|
||||
!patreonClientId || patreonClientId === 'id_from_patreon_dashboard'
|
||||
? null
|
||||
: patreonClientId,
|
||||
showUpcomingChanges: showUpcomingChanges === 'true'
|
||||
});
|
||||
|
Reference in New Issue
Block a user