diff --git a/.eslintcache b/.eslintcache
index 15d53cd..efa527d 100644
--- a/.eslintcache
+++ b/.eslintcache
@@ -1 +1 @@
-[{"D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\index.js":"1","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\App.jsx":"2","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\reportWebVitals.js":"3","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\Home.jsx":"4","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\signup.jsx":"5","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\login.jsx":"6","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\friends-liste.jsx":"7","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\components\\statistique.jsx":"8","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\components\\chat.jsx":"9","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\barre-gauche.jsx":"10","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\withAuth.jsx":"11","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\application2.jsx":"12","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\components\\paramètre.jsx":"13","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\components\\friend_nom.jsx":"14","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\barre-amis-gauche.jsx":"15"},{"size":598,"mtime":1617782906946,"results":"16","hashOfConfig":"17"},{"size":1381,"mtime":1617782906902,"results":"18","hashOfConfig":"17"},{"size":375,"mtime":1617782906947,"results":"19","hashOfConfig":"17"},{"size":19033,"mtime":1617782906903,"results":"20","hashOfConfig":"17"},{"size":3383,"mtime":1617782906947,"results":"21","hashOfConfig":"17"},{"size":3384,"mtime":1618135582969,"results":"22","hashOfConfig":"17"},{"size":4167,"mtime":1618407468552,"results":"23","hashOfConfig":"17"},{"size":2462,"mtime":1617783472207,"results":"24","hashOfConfig":"17"},{"size":7020,"mtime":1618393590893,"results":"25","hashOfConfig":"17"},{"size":2478,"mtime":1618402061185,"results":"26","hashOfConfig":"17"},{"size":1566,"mtime":1618252673276,"results":"27","hashOfConfig":"17"},{"size":2934,"mtime":1617782906903,"results":"28","hashOfConfig":"17"},{"size":2179,"mtime":1617894055611,"results":"29","hashOfConfig":"17"},{"size":1818,"mtime":1617782906906,"results":"30","hashOfConfig":"17"},{"size":1508,"mtime":1617812117051,"results":"31","hashOfConfig":"17"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},"15zyhu5",{"filePath":"35","messages":"36","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"37","usedDeprecatedRules":"34"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":25,"fixableErrorCount":0,"fixableWarningCount":0,"source":"42","usedDeprecatedRules":"34"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"45","usedDeprecatedRules":"34"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"48","usedDeprecatedRules":"34"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":7,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"51","messages":"52","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"53","usedDeprecatedRules":"34"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":9,"fixableErrorCount":0,"fixableWarningCount":0,"source":"56","usedDeprecatedRules":"34"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"63","usedDeprecatedRules":"34"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"66","usedDeprecatedRules":"34"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"69","usedDeprecatedRules":"34"},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},"D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\index.js",[],["72","73"],"D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\App.jsx",["74","75","76"],"import React, { Component } from 'react';\r\nimport { BrowserRouter, Route, Router, Link, Switch } from \"react-router-dom\"\r\nimport Home from './Home.jsx';\r\nimport Login from './login.jsx';\r\nimport Signup from './signup.jsx'\r\nimport rockets from './components/statistique.jsx'\r\nimport Friendsliste from './friends-liste.jsx'\r\nimport Application2 from './application2'\r\nimport withAuth from './withAuth'\r\nimport Chat from './components/chat.jsx'\r\nimport Parametre from './components/paramètre'\r\nimport './style/app.css'\r\n\r\nclass App extends Component {\r\n // différente route renvoyant un composant react\r\n render() {\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {/*withAuth permet de renvoyer le composant \"Application\" si la vérification des cookies est validé par le server*/}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default App;","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\reportWebVitals.js",[],"D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\Home.jsx",["77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101"],"import logoichat from './image/logo-ichat.png'\r\nimport fleche from './image/fleche.png'\r\nimport imagepage2 from './image/img-page2.png'\r\nimport imagepage3 from './image/img-page3.png'\r\nimport imagepage4 from './image/img-page4.png'\r\nimport imgprofil from './image/img-profil.jpg'\r\nimport fussée from './image/rocket.png'\r\nimport imgpage6 from './image/img-page6.png'\r\nimport imgLucas from './image/profil-Lucas.png'\r\nimport imgMatthieu from './image/profil-Matthieu.png'\r\nimport imglogotwitter from './image/logo-twitter.png'\r\nimport imglogoinsta from './image/logo-insta.png'\r\nimport imglogogithub from './image/003-github.png'\r\nimport logoichatblanc from './image/logo-ichat-white.png'\r\nimport { BrowserRouter, Route, Router, Link, Switch } from \"react-router-dom\"\r\nimport './style/Home.css';\r\nimport './style/responsive.css'\r\n\r\n// page de présentation du projet, le style n'est pas a jour\r\n\r\nfunction Home() {\r\n return (\r\n
Principe fondateur du projet iChat, gardez le contact avec vos amis pour des discussions sans fin au quotidien. Ichat vous permt d’être au près de vos amis tout le long de votre journée.
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Discussion fluide
\r\n
\r\n
\r\n
Profite de différents canaux de discussions, selon avec qui tu souhaites discuter et partager tes folles histoires. Une interface agréable, privilégiant un thème sombre pour le confort visuel.\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
Alexandre
\r\n
\r\n
\r\n
4
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
Delphine
\r\n
\r\n
\r\n
12
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
Paul
\r\n
\r\n
\r\n
26
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
Louis
\r\n
\r\n
\r\n
8
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Un suivi de tes relations
\r\n
\r\n
\r\n
Chaque jour suplémentaire où tu vas avoir des conversations avec un ami iChat, un compteur sera mis en place. Ce dernier se nomme le iChat Score. Chaque jour le compteur s’incrémente pour connaître la durée de vos relations.
\r\n 2016-2017 jusqu'à 2018/2019, collège du klosterwald Villé\r\n
\r\n
\r\n
\r\n Brevet des collèges : Mention Très bien\r\n
\r\n
\r\n
\r\n 2019/2020 jusqu'à 2020/2021, lycée Polyvalent Jean-Baptiste Schwilgué\r\n
\r\n
Enseignement de spécialité :
\r\n
\r\n
Maths
\r\n
Physique
\r\n
Numérique et Science de l'Informatique
\r\n
\r\n
\r\n
\r\n
\r\n
Profil
\r\n
\r\n Je suis actuellement au Schwilgué, en première général, étant interessé par les nouvelles technologies, mon choix a donc été influencé. De cette façon j'ai pris les enseignements de spécialités suivants: Maths, Physique, NSI. C'est pour cela que je souhaite\r\n m'orienter vers un métier centré sur cette thématique.Durant mon temps libre je m'investis dans divers projets numériques. De plus je sais utiliser divers outils de bureautique tels, que la suite microsoft ou les logiciels de montage photo/vidéo.\r\n
\r\n
Compétences
\r\n
\r\n
\r\n
Coding
\r\n \r\n
\r\n
\r\n
Photo montage
\r\n \r\n
\r\n
\r\n
Créativité
\r\n \r\n
\r\n
\r\n
Loisirs
\r\n
\r\n
Sport:
\r\n
\r\n
Ski
\r\n
Snowboard
\r\n
Vélo
\r\n
\r\n
Autre :
\r\n
\r\n
pilotage de drone
\r\n
programmation
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
Parcours scolaire
\r\n
\r\n
\r\n 2016/2017 jusqu'à 2018/2019, collège du Bernstein Dambach-la-ville\r\n
\r\n
\r\n
\r\n Brevet des collèges : Mention bien\r\n
\r\n
\r\n
\r\n 2019/2020 jusqu'à 2020/2021, lycée Polyvalent Jean-Baptiste Schwilgué\r\n
\r\n
Enseignement de spécialité :
\r\n
\r\n
Maths
\r\n
Physique
\r\n
Numérique et Science de l'Informatique
\r\n
\r\n
\r\n
\r\n
\r\n
Profil
\r\n
Je suis actuellement en premiere générale au lycée Schwilgué de Sélestat .Ayant un profil scientifique, j'ai choisi les spécialités suivantes: Maths Physique et Nsi. Je voudrais m'orienter vers un métier dans le domaine de l'informatique.\r\n
\r\n
Compétences
\r\n
\r\n
\r\n
Coding
\r\n \r\n
\r\n
\r\n
video montage
\r\n \r\n
\r\n
\r\n
Créativité
\r\n \r\n
\r\n
\r\n
Loisirs
\r\n
\r\n
Sport:
\r\n
\r\n
Football
\r\n
Vélo
\r\n
\r\n
Autre :
\r\n
\r\n
Jeux video
\r\n
Pilotage de drone
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
Nom : Diebolt
\r\n
Prénom : Matthieu
\r\n
Âge : 16 ans
\r\n
Numéro de téléphone : 06.47.55.58.32
\r\n
Adresse e-mail : matthieu.diebolt@gmail.com
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n );\r\n}\r\n\r\n\r\nconst styles = {\r\n \"list-style-type\":\"none\"\r\n }\r\n \r\nexport default Home;\r\n\r\n","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\signup.jsx",["102","103","104","105","106"],"import React, { Component } from 'react';\r\nimport axios from 'axios';\r\nimport { BrowserRouter, Route, Router, Link, Switch } from \"react-router-dom\"\r\nimport './style/singup.css';\r\n\r\nexport default class signup extends Component {\r\n // création des states suivant\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n email : '',\r\n mdp: '',\r\n pseudo:'',\r\n message:''\r\n };\r\n }\r\n // ajout des changement lorsque le texte de l'input change\r\n handleInputChange = (event) => {\r\n const { value, name } = event.target;\r\n this.setState({\r\n [name]: value\r\n });\r\n }\r\n // quand bouton submit pressé, envoyé une requête POST au serveur pour insérer le nouvel utilisateur dans la base de donnée\r\n onSubmit = (event) => {\r\n event.preventDefault();\r\n console.log(\"state signup : \",this.state);\r\n\r\n fetch('http://localhost:4000/authentification/signup', {\r\n method: 'POST',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include',\r\n body: JSON.stringify({\r\n pseudo:this.state.pseudo,\r\n email:this.state.email,\r\n mdp:this.state.mdp\r\n }),\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n })\r\n .then((value) => {\r\n if (value.status === 200) {\r\n // s'il y a eu aucune erreur redirigé à l'acceuil\r\n this.props.history.push('/app/friendlist');\r\n console.log(\"info envoyé\");\r\n } else {\r\n // s'il y a eu une erreur, renvoyer le message suivant\r\n this.setState({message:'Pseudo ou email déjà utilisé'});\r\n }\r\n })\r\n\r\n }\r\n \r\n render() {\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
{this.state.message}
\r\n
\r\n
\r\n
Welcome back
\r\n
Si tu as déjà un compte, il te suffit de te connecter !
\r\n SIGN IN\r\n
\r\n
\r\n
\r\n );\r\n\r\n }\r\n }","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\login.jsx",["107","108","109","110","111"],"import React, { Component } from 'react';\r\nimport axios from 'axios';\r\nimport { BrowserRouter, Route, Router, Link, Switch } from \"react-router-dom\"\r\nimport './style/login.css';\r\n\r\n\r\nexport default class login extends Component {\r\n // création des states suivant\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n email : '',\r\n mdp: '',\r\n message:''\r\n };\r\n }\r\n // ajout des changement lorsque le texte de l'input change\r\n handleInputChange = (event) => {\r\n const { value, name } = event.target;\r\n this.setState({\r\n [name]: value\r\n });\r\n }\r\n \r\n // lorsque le formulaire est submit, envoyer la requête POST suivante, qui envois les données\r\n onSubmit = (event) => {\r\n event.preventDefault();\r\n console.log(\"state login : \",this.state)\r\n fetch('http://localhost:4000/authentification/signin', {\r\n method: 'POST',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include', \r\n body: JSON.stringify({\r\n email:this.state.email,\r\n mdp:this.state.mdp\r\n }),\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n })\r\n .then(res => {\r\n if (res.status === 200) {\r\n // s'il y a aucune erreur, renvoyer vers l'acceuil\r\n this.props.history.push('/app/friendlist');\r\n }if (res.status === 401){\r\n // si erreur code est 401, renvoyer ce message\r\n this.setState({message:'Mot de passee incorrecte'});\r\n } \r\n else {\r\n // sinon, renvoyer ce message\r\n this.setState({message:'Mot de passe ou email incorrecte'});\r\n }\r\n })\r\n }\r\n \r\n render() {\r\n return (\r\n
\r\n
\r\n
\r\n
Hey
\r\n
Si tu n’as pas encore de compte crée en un !
\r\n SING UP\r\n
\r\n
\r\n \r\n
{this.state.message}
\r\n
\r\n
\r\n
\r\n \r\n );\r\n\r\n }\r\n }","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\friends-liste.jsx",["112","113","114","115","116","117","118"],"D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\components\\statistique.jsx",["119"],"import React, { Component } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport Barregauche from '../barre-gauche.jsx';\r\nimport rockets from '../image/rockets.png'\r\n\r\nexport default class StatWithFriend extends Component {\r\n\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n statistique_amis: [{}], \r\n amislist: [{}],\r\n FirstFriend:\"\"\r\n };\r\n }\r\n componentDidMount(){\r\n fetch('http://localhost:4000/app/statByUser', {\r\n method: 'GET',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include', \r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'Accept': 'application/json'\r\n }\r\n })\r\n .then(response => response.json())\r\n .then(response => { \r\n this.setState({statistique_amis:response})\r\n console.log(\"statistique : \",this.state.statistique_amis)\r\n })\r\n fetch('http://localhost:4000/app/friendlist', {\r\n method: 'GET',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include', \r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'Accept': 'application/json'\r\n }\r\n })\r\n .then(response => response.json())\r\n .then(response => {\r\n console.log(response)\r\n this.setState({amislist:response.data})\r\n this.setState({FirstFriend:response.firstFriend})\r\n })\r\n }\r\n\r\n\r\n\r\n render(){\r\n const {statistique_amis} = this.state\r\n return(\r\n
\r\n ); \r\n }\r\n }\r\n }","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\barre-gauche.jsx",["129"],"D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\withAuth.jsx",[],"D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\application2.jsx",["130","131"],"import React, { Component } from 'react';\r\n\r\nimport Chat from './components/chat';\r\nimport { Link } from 'react-router-dom';\r\nimport './style/app.css';\r\nimport Barregauche from './barre-gauche.jsx';\r\nimport Barreamisgauche from './barre-amis-gauche';\r\n\r\n\r\nexport default class Application2 extends Component {\r\n \r\n \r\n // création du State \"friend\"\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n friend : '',\r\n message : '',\r\n amislist: [{_id:0, _pseudo:\"\"}],\r\n firstFriend:\"\",\r\n user_nom : ''\r\n };\r\n }\r\n \r\n // ajout des changement lorsque le texte de l'input change\r\n handleInputChange = (event) => {\r\n const { value, name } = event.target;\r\n this.setState({\r\n [name]: value\r\n });\r\n }\r\n\r\n // fonction permettant de faire une requête POST au serveur et d'envoyer les données\r\n onSubmit = (event) => {\r\n event.preventDefault();\r\n console.log(\"state envois demande amis : \",this.state)\r\n // requête POST\r\n fetch('http://localhost:4000/app/newfriend', {\r\n method: 'POST',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include', \r\n body: JSON.stringify({\r\n new_friend: this.state.friend\r\n }),\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n })\r\n // renvois message de réussite ou non\r\n .then(res => {\r\n if (res.status === 200) {\r\n this.setState({message: \"\"})\r\n } else if(res.status === 400){\r\n this.setState({message : \"l'utilisateur rechercher n'existe pas\"})\r\n }\r\n else{\r\n console.log(\"erreur\")\r\n }\r\n })\r\n }\r\n componentDidMount(){\r\n fetch('http://localhost:4000/app/friendlist', {\r\n method: 'GET',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'Accept': 'application/json'\r\n }\r\n })\r\n .then(response => response.json())\r\n .then(response => {\r\n //console.log(response)\r\n this.setState({amislist:response.friends})\r\n this.setState({user_nom:response.pseudo})\r\n this.setState({firstFriend:response.firstFriend})\r\n //let test = this.state.amislist\r\n\r\n })\r\n }\r\n\r\n render() {\r\n const {message} = this.state\r\n const { id } = this.props.match.params;\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n ); \r\n }\r\n }","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\components\\paramètre.jsx",["132","133"],"import React, { Component } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport BarreGauche from '../barre-gauche'\r\n\r\nexport default class parametre extends Component {\r\n\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n newName:\"\",\r\n message:\"\"\r\n };\r\n }\r\n\r\n handleInputChange = (event) => {\r\n const { value, name } = event.target;\r\n this.setState({\r\n [name]: value\r\n });\r\n }\r\n sleep = (milliseconds) => {\r\n return new Promise(resolve => setTimeout(resolve, milliseconds))\r\n }\r\n onSubmit = async (event)=>{\r\n event.preventDefault();\r\n console.log(this.state)\r\n const test = await fetch('http://localhost:4000/app/changeName', {\r\n method: 'POST',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include', \r\n body: JSON.stringify({\r\n newName:this.state.newName\r\n }),\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n }\r\n })\r\n .then(res => {\r\n if (res.status === 200) {\r\n // s'il y a aucune erreur, renvoyer vers l'acceuil\r\n this.setState({message:'Le Changement de pseudo a bien été effectué'});\r\n }if (res.status === 401){\r\n // si erreur code est 401, renvoyer ce message\r\n this.setState({message:'Erreur'});\r\n } \r\n })\r\n this.setState({newName:\"\"})\r\n await this.sleep(3000)\r\n this.setState({message:\"\"});\r\n}\r\n render(){\r\n return(\r\n
\r\n \r\n \r\n
{this.state.message}
\r\n
\r\n );\r\n }\r\n}","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\components\\friend_nom.jsx",["134"],"import React, { Component } from 'react';\r\n\r\n\r\nexport default class friend_nom extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n nom:'',\r\n id:''\r\n };\r\n }\r\n componentDidMount(){\r\n fetch('http://localhost:4000/app/getFriendName', {\r\n method: 'POST',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include', \r\n body: JSON.stringify({\r\n name: this.props.id\r\n }),\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'Accept': 'application/json'\r\n }\r\n })\r\n .then(response => response.json())\r\n .then(response => {\r\n this.setState({nom:response})\r\n this.setState({id:this.props.id})\r\n })\r\n }\r\n componentDidUpdate(){\r\n if(this.state.id != this.props.id){\r\n fetch('http://localhost:4000/app/getFriendName', {\r\n method: 'POST',\r\n // credentials : include permet d'intégrer les cookie avec la requête\r\n credentials: 'include', \r\n body: JSON.stringify({\r\n name: this.props.id\r\n }),\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'Accept': 'application/json'\r\n }\r\n })\r\n .then(response => response.json())\r\n .then(response => {\r\n this.setState({nom:response})\r\n this.setState({id:this.props.id})\r\n })\r\n }\r\n }\r\n render(){\r\n return(\r\n
\r\n {this.state.nom}\r\n
\r\n\r\n );\r\n }\r\n}","D:\\Donnees\\Lucas\\Documents\\Ecole\\1er\\NSI\\myapp\\src\\barre-amis-gauche.jsx",[],{"ruleId":"135","replacedBy":"136"},{"ruleId":"137","replacedBy":"138"},{"ruleId":"139","severity":1,"message":"140","line":2,"column":32,"nodeType":"141","messageId":"142","endLine":2,"endColumn":38},{"ruleId":"139","severity":1,"message":"143","line":2,"column":40,"nodeType":"141","messageId":"142","endLine":2,"endColumn":44},{"ruleId":"139","severity":1,"message":"144","line":10,"column":8,"nodeType":"141","messageId":"142","endLine":10,"endColumn":12},{"ruleId":"139","severity":1,"message":"145","line":15,"column":10,"nodeType":"141","messageId":"142","endLine":15,"endColumn":23},{"ruleId":"139","severity":1,"message":"146","line":15,"column":25,"nodeType":"141","messageId":"142","endLine":15,"endColumn":30},{"ruleId":"139","severity":1,"message":"140","line":15,"column":32,"nodeType":"141","messageId":"142","endLine":15,"endColumn":38},{"ruleId":"139","severity":1,"message":"147","line":15,"column":46,"nodeType":"141","messageId":"142","endLine":15,"endColumn":52},{"ruleId":"148","severity":1,"message":"149","line":30,"column":17,"nodeType":"150","endLine":30,"endColumn":32},{"ruleId":"148","severity":1,"message":"149","line":31,"column":17,"nodeType":"150","endLine":31,"endColumn":32},{"ruleId":"148","severity":1,"message":"149","line":32,"column":17,"nodeType":"150","endLine":32,"endColumn":32},{"ruleId":"148","severity":1,"message":"149","line":43,"column":17,"nodeType":"150","endLine":43,"endColumn":49},{"ruleId":"151","severity":1,"message":"152","line":67,"column":17,"nodeType":"150","endLine":67,"endColumn":91},{"ruleId":"151","severity":1,"message":"152","line":96,"column":17,"nodeType":"150","endLine":96,"endColumn":94},{"ruleId":"151","severity":1,"message":"152","line":108,"column":17,"nodeType":"150","endLine":108,"endColumn":86},{"ruleId":"151","severity":1,"message":"152","line":112,"column":29,"nodeType":"150","endLine":112,"endColumn":108},{"ruleId":"151","severity":1,"message":"152","line":117,"column":29,"nodeType":"150","endLine":117,"endColumn":92},{"ruleId":"151","severity":1,"message":"152","line":122,"column":29,"nodeType":"150","endLine":122,"endColumn":106},{"ruleId":"151","severity":1,"message":"152","line":127,"column":29,"nodeType":"150","endLine":127,"endColumn":92},{"ruleId":"151","severity":1,"message":"152","line":132,"column":29,"nodeType":"150","endLine":132,"endColumn":98},{"ruleId":"151","severity":1,"message":"152","line":137,"column":29,"nodeType":"150","endLine":137,"endColumn":92},{"ruleId":"151","severity":1,"message":"152","line":143,"column":29,"nodeType":"150","endLine":143,"endColumn":100},{"ruleId":"151","severity":1,"message":"152","line":148,"column":29,"nodeType":"150","endLine":148,"endColumn":92},{"ruleId":"153","severity":1,"message":"154","line":164,"column":9,"nodeType":"150","endLine":164,"endColumn":108},{"ruleId":"151","severity":1,"message":"152","line":185,"column":21,"nodeType":"150","endLine":185,"endColumn":91},{"ruleId":"151","severity":1,"message":"152","line":190,"column":21,"nodeType":"150","endLine":190,"endColumn":93},{"ruleId":"151","severity":1,"message":"152","line":194,"column":21,"nodeType":"150","endLine":194,"endColumn":106},{"ruleId":"151","severity":1,"message":"152","line":204,"column":17,"nodeType":"150","endLine":204,"endColumn":91},{"ruleId":"151","severity":1,"message":"152","line":332,"column":17,"nodeType":"150","endLine":332,"endColumn":96},{"ruleId":"139","severity":1,"message":"155","line":2,"column":8,"nodeType":"141","messageId":"142","endLine":2,"endColumn":13},{"ruleId":"139","severity":1,"message":"145","line":3,"column":10,"nodeType":"141","messageId":"142","endLine":3,"endColumn":23},{"ruleId":"139","severity":1,"message":"146","line":3,"column":25,"nodeType":"141","messageId":"142","endLine":3,"endColumn":30},{"ruleId":"139","severity":1,"message":"140","line":3,"column":32,"nodeType":"141","messageId":"142","endLine":3,"endColumn":38},{"ruleId":"139","severity":1,"message":"147","line":3,"column":46,"nodeType":"141","messageId":"142","endLine":3,"endColumn":52},{"ruleId":"139","severity":1,"message":"155","line":2,"column":8,"nodeType":"141","messageId":"142","endLine":2,"endColumn":13},{"ruleId":"139","severity":1,"message":"145","line":3,"column":10,"nodeType":"141","messageId":"142","endLine":3,"endColumn":23},{"ruleId":"139","severity":1,"message":"146","line":3,"column":25,"nodeType":"141","messageId":"142","endLine":3,"endColumn":30},{"ruleId":"139","severity":1,"message":"140","line":3,"column":32,"nodeType":"141","messageId":"142","endLine":3,"endColumn":38},{"ruleId":"139","severity":1,"message":"147","line":3,"column":46,"nodeType":"141","messageId":"142","endLine":3,"endColumn":52},{"ruleId":"139","severity":1,"message":"145","line":2,"column":10,"nodeType":"141","messageId":"142","endLine":2,"endColumn":23},{"ruleId":"139","severity":1,"message":"146","line":2,"column":25,"nodeType":"141","messageId":"142","endLine":2,"endColumn":30},{"ruleId":"139","severity":1,"message":"140","line":2,"column":32,"nodeType":"141","messageId":"142","endLine":2,"endColumn":38},{"ruleId":"139","severity":1,"message":"147","line":2,"column":46,"nodeType":"141","messageId":"142","endLine":2,"endColumn":52},{"ruleId":"139","severity":1,"message":"144","line":4,"column":8,"nodeType":"141","messageId":"142","endLine":4,"endColumn":12},{"ruleId":"139","severity":1,"message":"156","line":5,"column":10,"nodeType":"141","messageId":"142","endLine":5,"endColumn":20},{"ruleId":"139","severity":1,"message":"157","line":7,"column":8,"nodeType":"141","messageId":"142","endLine":7,"endColumn":22},{"ruleId":"139","severity":1,"message":"143","line":2,"column":10,"nodeType":"141","messageId":"142","endLine":2,"endColumn":14},{"ruleId":"139","severity":1,"message":"156","line":4,"column":10,"nodeType":"141","messageId":"142","endLine":4,"endColumn":20},{"ruleId":"139","severity":1,"message":"158","line":6,"column":8,"nodeType":"141","messageId":"142","endLine":6,"endColumn":27},{"ruleId":"159","severity":1,"message":"160","line":87,"column":7,"nodeType":"161","messageId":"162","endLine":108,"endColumn":8},{"ruleId":"163","severity":1,"message":"164","line":100,"column":20,"nodeType":"165","messageId":"162","endLine":100,"endColumn":22},{"ruleId":"163","severity":1,"message":"164","line":110,"column":31,"nodeType":"165","messageId":"162","endLine":110,"endColumn":33},{"ruleId":"139","severity":1,"message":"166","line":128,"column":13,"nodeType":"141","messageId":"142","endLine":128,"endColumn":18},{"ruleId":"139","severity":1,"message":"167","line":129,"column":13,"nodeType":"141","messageId":"142","endLine":129,"endColumn":17},{"ruleId":"163","severity":1,"message":"168","line":144,"column":38,"nodeType":"165","messageId":"162","endLine":144,"endColumn":40},{"ruleId":"163","severity":1,"message":"168","line":179,"column":36,"nodeType":"165","messageId":"162","endLine":179,"endColumn":38},{"ruleId":"151","severity":1,"message":"152","line":41,"column":25,"nodeType":"150","endLine":41,"endColumn":86},{"ruleId":"139","severity":1,"message":"143","line":4,"column":10,"nodeType":"141","messageId":"142","endLine":4,"endColumn":14},{"ruleId":"139","severity":1,"message":"169","line":83,"column":14,"nodeType":"141","messageId":"142","endLine":83,"endColumn":21},{"ruleId":"139","severity":1,"message":"143","line":2,"column":10,"nodeType":"141","messageId":"142","endLine":2,"endColumn":14},{"ruleId":"139","severity":1,"message":"170","line":27,"column":13,"nodeType":"141","messageId":"142","endLine":27,"endColumn":17},{"ruleId":"163","severity":1,"message":"164","line":32,"column":26,"nodeType":"165","messageId":"162","endLine":32,"endColumn":28},"no-native-reassign",["171"],"no-negated-in-lhs",["172"],"no-unused-vars","'Router' is defined but never used.","Identifier","unusedVar","'Link' is defined but never used.","'Chat' is defined but never used.","'BrowserRouter' is defined but never used.","'Route' is defined but never used.","'Switch' is defined but never used.","jsx-a11y/anchor-is-valid","The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","JSXOpeningElement","jsx-a11y/img-redundant-alt","Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the words `image`, `photo,` or `picture` (or any specified custom words) in the alt prop.","jsx-a11y/iframe-has-title","