diff --git a/.env.production b/.env.production index 8bde5ac0..efdce131 100644 --- a/.env.production +++ b/.env.production @@ -12,7 +12,9 @@ ESRI_CLIENT_SECRET= SCHEME=https # Only required to upload sourcemaps +NEXT_PUBLIC_SENTRY_DSN=https://ff1dd354f7b94b459fd45c9f173fab7c@o78291.ingest.sentry.io/6108978 SENTRY_ORG=plant-for-the-planet -SENTRY_PROJECT=app-20-next -NEXT_PUBLIC_SENTRY_DSN=https://379fe47664a541efbb2833ed3923c56b@o78291.ingest.sentry.io/5433504 -RECURRENCY=true \ No newline at end of file +SENTRY_PROJECT=planet-donations +SENTRY_AUTH_TOKEN= +SOURCE_VERSION= +RECURRENCY=true diff --git a/next.config.js b/next.config.js index aa3e2d2f..b538ae0d 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,4 @@ const withPlugins = require("next-compose-plugins"); -// Use the hidden-source-map option when you don't want the source maps to be -// publicly available on the servers, only to the error reporting -const withSourceMaps = require("@zeit/next-source-maps")(); const withBundleAnalyzer = require("@next/bundle-analyzer")({ enabled: process.env.ANALYZE === "true", }); @@ -16,6 +13,7 @@ const { SENTRY_PROJECT, SENTRY_AUTH_TOKEN, NODE_ENV, + VERCEL_GIT_COMMIT_SHA, VERCEL_GITHUB_COMMIT_SHA, VERCEL_GITLAB_COMMIT_SHA, VERCEL_BITBUCKET_COMMIT_SHA, @@ -23,6 +21,7 @@ const { } = process.env; const COMMIT_SHA = + VERCEL_GIT_COMMIT_SHA || VERCEL_GITHUB_COMMIT_SHA || VERCEL_GITLAB_COMMIT_SHA || VERCEL_BITBUCKET_COMMIT_SHA || @@ -46,7 +45,8 @@ if (process.env.NEXT_PUBLIC_VERCEL_ENV === "preview") { const hasAssetPrefix = process.env.ASSET_PREFIX !== "" && process.env.ASSET_PREFIX !== undefined; -module.exports = withPlugins([[withBundleAnalyzer], [withSourceMaps]], { +module.exports = withPlugins([[withBundleAnalyzer]], { + productionBrowserSourceMaps: true, serverRuntimeConfig: { rootDir: __dirname, }, @@ -87,13 +87,6 @@ module.exports = withPlugins([[withBundleAnalyzer], [withSourceMaps]], { NODE_ENV === "production" ) { config.plugins.push( - new SentryWebpackPlugin({ - include: ".next", - ignore: ["node_modules"], - stripPrefix: ["webpack://_N_E/"], - urlPrefix: `~${basePath}/_next`, - release: COMMIT_SHA, - }), new SentryWebpackPlugin({ include: ".next", ignore: ["node_modules"], diff --git a/package-lock.json b/package-lock.json index 6bd3f124..e36221da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,6 @@ "@sentry/webpack-plugin": "^1.14.2", "@stripe/react-stripe-js": "^1.4.0", "@stripe/stripe-js": "^1.13.2", - "@zeit/next-source-maps": "0.0.4-canary.1", "axios": "^0.21.1", "dom-to-image": "^2.6.0", "geocoder-arcgis": "^2.0.5", @@ -1896,12 +1895,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@zeit/next-source-maps": { - "version": "0.0.4-canary.1", - "resolved": "https://registry.npmjs.org/@zeit/next-source-maps/-/next-source-maps-0.0.4-canary.1.tgz", - "integrity": "sha512-SPQCLs7ToaqzQnqXqGSCoL7KTlnOAao+1F5hy7Hkuq85TjHsUC3eeLsmVrBIraIhXG/ARHmZ0JHOesPDtBfpzw==", - "deprecated": "Next.js now has built-in support for Source Maps: https://nextjs.org/docs/advanced-features/source-maps" - }, "node_modules/abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", @@ -9673,11 +9666,6 @@ "eslint-visitor-keys": "^2.0.0" } }, - "@zeit/next-source-maps": { - "version": "0.0.4-canary.1", - "resolved": "https://registry.npmjs.org/@zeit/next-source-maps/-/next-source-maps-0.0.4-canary.1.tgz", - "integrity": "sha512-SPQCLs7ToaqzQnqXqGSCoL7KTlnOAao+1F5hy7Hkuq85TjHsUC3eeLsmVrBIraIhXG/ARHmZ0JHOesPDtBfpzw==" - }, "abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", diff --git a/package.json b/package.json index 560e7943..775de245 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "@sentry/webpack-plugin": "^1.14.2", "@stripe/react-stripe-js": "^1.4.0", "@stripe/stripe-js": "^1.13.2", - "@zeit/next-source-maps": "0.0.4-canary.1", "axios": "^0.21.1", "dom-to-image": "^2.6.0", "geocoder-arcgis": "^2.0.5", diff --git a/src/Donations/Components/PaymentsForm.tsx b/src/Donations/Components/PaymentsForm.tsx index 8a74d0cd..ca2f38da 100644 --- a/src/Donations/Components/PaymentsForm.tsx +++ b/src/Donations/Components/PaymentsForm.tsx @@ -118,11 +118,7 @@ function PaymentsForm({}: Props): ReactElement { const onPaymentFunction = async (paymentMethod: any, paymentRequest: any) => { setPaymentType(paymentRequest._activeBackingLibraryName); const gateway = "stripe"; - onSubmitPayment( - gateway, - "card", - paymentMethod - ); + onSubmitPayment(gateway, "card", paymentMethod); }; async function getDonation() { @@ -306,7 +302,8 @@ function PaymentsForm({}: Props): ReactElement { showSepa={showPaymentMethod({ paymentMethod: "sepa_debit", currencies: ["EUR"], - authenticatedMethod: true, + authenticatedMethod: + projectDetails.purpose === "funds" ? false : true, })} showSofort={showPaymentMethod({ paymentMethod: "sofort", diff --git a/src/Donations/Micros/DonationTypes/FundingDonations.tsx b/src/Donations/Micros/DonationTypes/FundingDonations.tsx index a6731fc3..1f976195 100644 --- a/src/Donations/Micros/DonationTypes/FundingDonations.tsx +++ b/src/Donations/Micros/DonationTypes/FundingDonations.tsx @@ -76,7 +76,7 @@ function FundingDonations({ setopenCurrencyModal }: Props): ReactElement { }, [paymentSetup]); const customInputRef = React.useRef(null); - console.log(`option.quantity , quantity `, paymentSetup.options, quantity); + return ( <>