{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\user\\\\Desktop\\\\05mediaSocial\\\\client\\\\src\\\\App.js\",\n  _s = $RefreshSig$();\n// import {BrowserRouter as Router,Routes,Route, Navigate} from \"react-router-dom\";\nimport { useEffect, useState } from \"react\";\nimport { Routes, Route } from \"react-router-dom\";\nimport { UidContext } from \"./components/AppContext\";\nimport Home from \"./pages/Home\";\nimport Profil from \"./pages/Profil\";\nimport Trending from \"./pages/Trending\";\nimport './styles/index.scss';\n// import { UidContext } from \"./components/AppContext\";\nimport axios from \"axios\";\n// import { JsonWebTokenError } from \"jsonwebtoken\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst 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        // data:{token},\n      }).then(res => {\n        console.log(res);\n        setUid;\n      });\n    };\n    fetchToken();\n  }, []);\n  return /*#__PURE__*/_jsxDEV(UidContext.Provider, {\n    value: uid,\n    children: /*#__PURE__*/_jsxDEV(Routes, {\n      children: [/*#__PURE__*/_jsxDEV(Route, {\n        path: \"/\",\n        element: /*#__PURE__*/_jsxDEV(Home, {}, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 39,\n          columnNumber: 39\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 39,\n        columnNumber: 13\n      }, this), /*#__PURE__*/_jsxDEV(Route, {\n        path: \"/profil\",\n        element: /*#__PURE__*/_jsxDEV(Profil, {}, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 40,\n          columnNumber: 45\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 40,\n        columnNumber: 13\n      }, this), /*#__PURE__*/_jsxDEV(Route, {\n        path: \"/trending\",\n        element: /*#__PURE__*/_jsxDEV(Trending, {}, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 41,\n          columnNumber: 47\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 41,\n        columnNumber: 13\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 38,\n      columnNumber: 9\n    }, this)\n  }, void 0, false, {\n    fileName: _jsxFileName,\n    lineNumber: 36,\n    columnNumber: 8\n  }, this);\n};\n_s(App, \"UA7wbu8o5UFR7dgJQqjwxspSPDQ=\");\n_c = App;\nexport default App;\nvar _c;\n$RefreshReg$(_c, \"App\");","map":{"version":3,"names":["useEffect","useState","Routes","Route","UidContext","Home","Profil","Trending","axios","App","uid","setUid","fetchToken","method","url","process","env","REACT_APP_API_URL","withCredentials","then","res","console","log"],"sources":["C:/Users/user/Desktop/05mediaSocial/client/src/App.js"],"sourcesContent":["\n\n// import {BrowserRouter as Router,Routes,Route, Navigate} from \"react-router-dom\";\nimport { useEffect, useState } from \"react\";\nimport { Routes,Route} from \"react-router-dom\"\nimport { UidContext } from \"./components/AppContext\";\nimport Home from \"./pages/Home\";\nimport Profil from \"./pages/Profil\";\nimport Trending from \"./pages/Trending\";\nimport './styles/index.scss'\n// import { UidContext } from \"./components/AppContext\";\nimport axios from \"axios\";\n// import { JsonWebTokenError } from \"jsonwebtoken\";\n\nconst App=()=>{\n\n    const [uid,setUid]=useState(null)\n\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            // data:{token},\n        } )\n       .then((res)=>{\n        console.log(res);\n        setUid\n       })\n    }\n    fetchToken()\n    } ,[] );\n\n    return(\n       <UidContext.Provider value={uid} >\n\n        <Routes>\n            <Route path=\"/\" element= {<Home/> } />\n            <Route path=\"/profil\" element= {<Profil/> } />\n            <Route path=\"/trending\" element= {<Trending/> } />\n         \n{/* \n            <Route path=\"/profil\"element= {<Profil/> } />\n            <Route path=\"/trending\" element= {<Trending/> } /> */}\n            {/* <Navigate to=\"/\" /> */}\n        </Routes> \n       </UidContext.Provider >\n   \n    )\n};\n\nexport default App;"],"mappings":";;AAEA;AACA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,MAAM,EAACC,KAAK,QAAO,kBAAkB;AAC9C,SAASC,UAAU,QAAQ,yBAAyB;AACpD,OAAOC,IAAI,MAAM,cAAc;AAC/B,OAAOC,MAAM,MAAM,gBAAgB;AACnC,OAAOC,QAAQ,MAAM,kBAAkB;AACvC,OAAO,qBAAqB;AAC5B;AACA,OAAOC,KAAK,MAAM,OAAO;AACzB;AAAA;AAEA,MAAMC,GAAG,GAAC,MAAI;EAAA;EAEV,MAAM,CAACC,GAAG,EAACC,MAAM,CAAC,GAACV,QAAQ,CAAC,IAAI,CAAC;EAEjCD,SAAS,CAAC,MAAI;IACV,MAAMY,UAAU,GAAC,YAAS;MAC1B,MAAMJ,KAAK,CAAC;QACRK,MAAM,EAAC,KAAK;QACZC,GAAG,EAAE,GAAEC,OAAO,CAACC,GAAG,CAACC,iBAAkB,SAAQ;QAC7CC,eAAe,EAAC;QAChB;MACJ,CAAC,CAAE,CACHC,IAAI,CAAEC,GAAG,IAAG;QACZC,OAAO,CAACC,GAAG,CAACF,GAAG,CAAC;QAChBT,MAAM;MACP,CAAC,CAAC;IACL,CAAC;IACDC,UAAU,EAAE;EACZ,CAAC,EAAE,EAAE,CAAE;EAEP,oBACG,QAAC,UAAU,CAAC,QAAQ;IAAC,KAAK,EAAEF,GAAI;IAAA,uBAE/B,QAAC,MAAM;MAAA,wBACH,QAAC,KAAK;QAAC,IAAI,EAAC,GAAG;QAAC,OAAO,eAAG,QAAC,IAAI;UAAA;UAAA;UAAA;QAAA;MAAI;QAAA;QAAA;QAAA;MAAA,QAAG,eACtC,QAAC,KAAK;QAAC,IAAI,EAAC,SAAS;QAAC,OAAO,eAAG,QAAC,MAAM;UAAA;UAAA;UAAA;QAAA;MAAI;QAAA;QAAA;QAAA;MAAA,QAAG,eAC9C,QAAC,KAAK;QAAC,IAAI,EAAC,WAAW;QAAC,OAAO,eAAG,QAAC,QAAQ;UAAA;UAAA;UAAA;QAAA;MAAI;QAAA;QAAA;QAAA;MAAA,QAAG;IAAA;MAAA;MAAA;MAAA;IAAA;EAM7C;IAAA;IAAA;IAAA;EAAA,QACa;AAG9B,CAAC;AAAC,GApCID,GAAG;AAAA,KAAHA,GAAG;AAsCT,eAAeA,GAAG;AAAC;AAAA"},"metadata":{},"sourceType":"module","externalDependencies":[]}