Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
folland87 committed Oct 4, 2021
2 parents 7247d01 + b64c7fc commit 253ff55
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/Components/Shared/ErrorBoundary/ErrorBoundary.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Axios from 'axios';
import { API_ERRORS_SCANR } from '../../../config/config';
// import Axios from 'axios';
// import { API_ERRORS_SCANR } from '../../../config/config';
import Errors from '../Errors/Errors';

class ErrorBoundary extends Component {
Expand All @@ -15,17 +15,17 @@ class ErrorBoundary extends Component {
return { hasError: true };
}

componentDidCatch(error, info) {
// Vous pouvez aussi enregistrer l'erreur au sein d'un service de rapport.
const errorJSON = {
type: 'React boundary',
url: window.location.href.toString(),
agent: window.navigator.userAgent.toString(),
msg: error.toString(),
info: info.componentStack,
};
Axios.post(API_ERRORS_SCANR, errorJSON);
}
// componentDidCatch(error, info) {
// // Vous pouvez aussi enregistrer l'erreur au sein d'un service de rapport.
// const errorJSON = {
// type: 'React boundary',
// url: window.location.href.toString(),
// agent: window.navigator.userAgent.toString(),
// msg: error.toString(),
// info: info.componentStack,
// };
// Axios.post(API_ERRORS_SCANR, errorJSON);
// }

render() {
if (this.state.hasError) {
Expand Down
8 changes: 8 additions & 0 deletions src/Components/Shared/Footer/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ const Footer = () => {
/>
</a>
</li>
<li>
<a href="/tutorial">
<FormattedHTMLMessage
id="Footer.link.tutorial"
defaultMessage="Footer.link.tutorial"
/>
</a>
</li>
{/* <li>
<FormattedHTMLMessage
id="Footer.link.contribute"
Expand Down

0 comments on commit 253ff55

Please sign in to comment.