Skip to content

Commit

Permalink
[react] fix mis-merge of PR #331
Browse files Browse the repository at this point in the history
  • Loading branch information
realkosty committed Nov 29, 2023
1 parent 7ba8b42 commit 99e0e1e
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions react/src/components/Products.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,10 @@ function Products({ frontendSlowdown, backend }) {
useEffect(() => {
// getProducts handles error responses differently, depending on the browser used
function getProducts(frontendSlowdown) {
let se, customerType, email;
Sentry.withScope(function (scope) {
[se, customerType] = [scope._tags.se, scope._tags.customerType];
email = scope._user.email;
});

[('/api', '/connect', '/organization')].forEach((endpoint) => {
fetch(backend + endpoint, {
method: 'GET',
headers: {
se,
customerType,
email,
'Content-Type': 'application/json',
},
headers: { 'Content-Type': 'application/json' },
}).catch((err) => {
// If there's an error, it won't stop the Products http request and page from loading
Sentry.captureException(err);
Expand All @@ -108,12 +97,7 @@ function Products({ frontendSlowdown, backend }) {

fetch(backend + productsEndpoint, {
method: 'GET',
headers: {
se,
customerType,
email,
'Content-Type': 'application/json',
},
headers: { 'Content-Type': 'application/json' },
})
.then((result) => {
if (!result.ok) {
Expand Down

0 comments on commit 99e0e1e

Please sign in to comment.