{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\noanr\\\\OneDrive\\\\Documents\\\\2eme an\\xE9e\\\\Projet Favor Complet\\\\client\\\\src\\\\App.js\",\n _s = $RefreshSig$();\nimport Routes from \"./components/Routes\";\nimport { UidContext } from \"./components/AppContext\";\nimport { useEffect, useState } from \"react\";\nimport axios from \"axios\";\n\n//useeffect controle le token de l'utilisateur \n//les crochets dans le use effect permette de pas lancer la fonction à l'infini\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nfunction App() {\n _s();\n const [uid, setUid] = useState(null);\n useEffect(() => {\n const fetchToken = async () => {\n await axios({\n method: \"get\",\n url: `${process.env.REACT_APP_API_URL}jwtid`,\n withCredentials: true\n }).then(res => setUid(res.data)).catch(err => console.log(\"No Token\"));\n };\n fetchToken();\n }, []);\n return /*#__PURE__*/_jsxDEV(UidContext.Provider, {\n value: uid,\n children: /*#__PURE__*/_jsxDEV(Routes, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 5\n }, this);\n}\n_s(App, \"6AQDjhy1IX6JQErF13hg073z7kA=\");\n_c = App;\nexport default App;\n/*
\n Edit src/App.js
and save to reload.\n
\n Edit src/App.js
and save to reload.\n