Commit a49a34cc authored by Mathias Engelbrecht Pilegård's avatar Mathias Engelbrecht Pilegård
Browse files

fixed useEffect and render race condition for dynamic name loading on home page

parent b4f619b2
This diff is collapsed.
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n });\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"h1\", {\n children: \"Loading...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","token","getUserInfo","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACdM,IAAAA,QAAQ,CAACG,KAAT,CAAeC,WAAf,GAA6BC,IAA7B,CAAkCC,IAAI,IAAI;AACxCJ,MAAAA,WAAW,CAACI,IAAD,CAAX;AACD,KAFD;AAGD,GAJQ,CAAT;;AAMA,MAAIL,QAAJ,EAAc;AACZ,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAAC,gBAAf;AAAA,gCACE;AAAI,UAAA,SAAS,EAAC,cAAd;AAAA,iCAAsCA,QAAQ,CAACM,UAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE,QAAC,OAAD;AAAS,UAAA,EAAE,EAAC,cAAZ;AAAA,iCACE;AAAQ,YAAA,SAAS,EAAC,yBAAlB;AAAA,oCACE,QAAC,eAAD;AAAiB,cAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,oBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAUE;AAAK,QAAA,SAAS,EAAC,kBAAf;AAAA,+BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAVF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,wBACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAGD;AAGF,CApCD;;GAAMT,I;UAC4BP,W;;;KAD5BO,I;AAsCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n })\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <h1>Loading...</h1>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n });\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"Loading...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","token","getUserInfo","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B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AmBK;AACH,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CAtCD;;GAAMT,I;UAC4BP,W;;;KAD5BO,I;AAwCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n })\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>Loading...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims;\n useEffect(() => {\n setUserInfo(idToken);\n }, []);\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","idToken","JSON","parse","localStorage","getItem","claims","name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AACA,QAAMU,OAAO,GAAGC,IAAI,CAACC,KAAL,CAAWC,YAAY,CAACC,OAAb,CAAqB,oBAArB,CAAX,EAAuDJ,OAAvD,CAA+DK,MAA/E;AAEAd,EAAAA,SAAS,CAAC,MAAM;AACdQ,IAAAA,WAAW,CAACC,OAAD,CAAX;AACD,GAFQ,EAEN,EAFM,CAAT;;AAIA,MAAIF,QAAJ,EAAc;AACZ,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAAC,gBAAf;AAAA,gCACE;AAAI,UAAA,SAAS,EAAC,cAAd;AAAA,iCAAsCA,QAAQ,CAACQ,IAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE,QAAC,OAAD;AAAS,UAAA,EAAE,EAAC,cAAZ;AAAA,iCACE;AAAQ,YAAA,SAAS,EAAC,yBAAlB;AAAA,oCACE,QAAC,eAAD;AAAiB,cAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,oBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAUE;AAAK,QAAA,SAAS,EAAC,kBAAf;AAAA,+BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAVF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CArCD;;GAAMX,I;UAC4BP,W;;;KAD5BO,I;AAuCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims\r\n\r\n useEffect(() => {\r\n setUserInfo(idToken)\r\n }, [])\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n if (!authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n }\n }, [authState, oktaAuth]); // Update if authState changes\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","isAuthenticated","token","getUserInfo","then","info","name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG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"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!authState.isAuthenticated) {\r\n // When user isn't authenticated, forget any user info\r\n setUserInfo(null);\r\n } else {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n }\r\n }, [authState, oktaAuth]); // Update if authState changes\r\n\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n }, []);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInf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A;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CA1BD;;GAAMT,I;UAC4BP,W;;;KAD5BO,I;AA4BN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n oktaAuth.token.getUserInfo().then((info) => {\r\n setUserInfo(info);\r\n })\r\n }, [])\r\n\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n if (!authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n }\n }, [authState, oktaAuth]); // Update if authState changes\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","isAuthenticated","token","getUserInfo","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACK,SAAS,CAACI,eAAf,EAAgC;AAC9B;AACAD,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACI,KAAT,CAAeC,WAAf,GAA6BC,IAA7B,CAAkCC,IAAI,IAAI;AACxCL,QAAAA,WAAW,CAACK,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACR,SAAD,EAAYC,QAAZ,CATM,CAAT,CAJiB,CAaU;;AAE3B,sBACE;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,gBAAf;AAAA,8BACE;AAAI,QAAA,SAAS,EAAC,cAAd;AAAA,+BAAsCC,QAAQ,CAACO,UAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAEE,QAAC,OAAD;AAAS,QAAA,EAAE,EAAC,cAAZ;AAAA,+BACE;AAAQ,UAAA,SAAS,EAAC,yBAAlB;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAUE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,6BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAVF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CA/BD;;GAAMV,I;UAC4BP,W;;;KAD5BO,I;AAiCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!authState.isAuthenticated) {\r\n // When user isn't authenticated, forget any user info\r\n setUserInfo(null);\r\n } else {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n }\r\n }, [authState, oktaAuth]); // Update if authState changes\r\n\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n console.log(oktaAuth.getIdToken.claims);\n });\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: \"Welcome!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 18,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","console","log","getIdToken","claims"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACdS,IAAAA,OAAO,CAACC,GAAR,CAAYJ,QAAQ,CAACK,UAAT,CAAoBC,MAAhC;AACD,GAFQ,CAAT;AAIA,sBACE;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,gBAAf;AAAA,8BACE;AAAI,QAAA,SAAS,EAAC,cAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAEE,QAAC,OAAD;AAAS,QAAA,EAAE,EAAC,cAAZ;AAAA,+BACE;AAAQ,UAAA,SAAS,EAAC,yBAAlB;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAUE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,6BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAVF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CAxBD;;GAAMR,I;UAC4BP,W;;;KAD5BO,I;AA0BN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n console.log(oktaAuth.getIdToken.claims)\r\n })\r\n\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const tokenId = JSON.parse(localStorage.getItem('okta-token-storage'));\n useEffect(() => {\n tokenId.tokenId.claims.then(info => {\n setUserInfo(info);\n });\n });\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"Loading...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","tokenId","JSON","parse","localStorage","getItem","claims","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AACA,QAAMU,OAAO,GAAGC,IAAI,CAACC,KAAL,CAAWC,YAAY,CAACC,OAAb,CAAqB,oBAArB,CAAX,CAAhB;AAEAb,EAAAA,SAAS,CAAC,MAAM;AACdS,IAAAA,OAAO,CAACA,OAAR,CAAgBK,MAAhB,CAAuBC,IAAvB,CAA4BC,IAAI,IAAI;AAClCR,MAAAA,WAAW,CAACQ,IAAD,CAAX;AACD,KAFD;AAGD,GAJQ,CAAT;;AAMA,MAAIT,QAAJ,EAAc;AACZ,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAAC,gBAAf;AAAA,gCACE;AAAI,UAAA,SAAS,EAAC,cAAd;AAAA,iCAAsCA,QAAQ,CAACU,UAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE,QAAC,OAAD;AAAS,UAAA,EAAE,EAAC,cAAZ;AAAA,iCACE;AAAQ,YAAA,SAAS,EAAC,yBAAlB;AAAA,oCACE,QAAC,eAAD;AAAiB,cAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,oBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAUE;AAAK,QAAA,SAAS,EAAC,kBAAf;AAAA,+BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAVF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CAvCD;;GAAMb,I;UAC4BP,W;;;KAD5BO,I;AAyCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n const tokenId = JSON.parse(localStorage.getItem('okta-token-storage'))\r\n\r\n useEffect(() => {\r\n tokenId.tokenId.claims.then(info => {\r\n setUserInfo(info);\r\n });\r\n })\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>Loading...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n const fetchData = async () => {\n const response = await fetch(JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims);\n setUserInfo(idToken);\n };\n });\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","fetchData","response","fetch","JSON","parse","localStorage","getItem","idToken","claims","name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACd,UAAMS,SAAS,GAAG,YAAY;AAC5B,YAAMC,QAAQ,GAAG,MAAMC,KAAK,CAACC,IAAI,CAACC,KAAL,CAAWC,YAAY,CAACC,OAAb,CAAqB,oBAArB,CAAX,EAAuDC,OAAvD,CAA+DC,MAAhE,CAA5B;AACAT,MAAAA,WAAW,CAACQ,OAAD,CAAX;AACD,KAHD;AAKD,GANQ,CAAT;;AAQA,MAAIT,QAAJ,EAAc;AACZ,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAAC,gBAAf;AAAA,gCACE;AAAI,UAAA,SAAS,EAAC,cAAd;AAAA,iCAAsCA,QAAQ,CAACW,IAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE,QAAC,OAAD;AAAS,UAAA,EAAE,EAAC,cAAZ;AAAA,iCACE;AAAQ,YAAA,SAAS,EAAC,yBAAlB;AAAA,oCACE,QAAC,eAAD;AAAiB,cAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,oBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAUE;AAAK,QAAA,SAAS,EAAC,kBAAf;AAAA,+BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAVF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CAxCD;;GAAMd,I;UAC4BP,W;;;KAD5BO,I;AA0CN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n const response = await fetch(JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims)\r\n setUserInfo(idToken)\r\n }\r\n\r\n })\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n if (!authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n }\n }, [authState, oktaAuth]); // Update if authState changes\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo ? userInfo.given_name : null, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","isAuthenticated","token","getUserInfo","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACK,SAAS,CAACI,eAAf,EAAgC;AAC9B;AACAD,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACI,KAAT,CAAeC,WAAf,GAA6BC,IAA7B,CAAkCC,IAAI,IAAI;AACxCL,QAAAA,WAAW,CAACK,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACR,SAAD,EAAYC,QAAZ,CATM,CAAT,CAJiB,CAaU;;AAE3B,sBACE;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,gBAAf;AAAA,8BACE;AAAI,QAAA,SAAS,EAAC,cAAd;AAAA,+BAAsCC,QAAQ,GAAGA,QAAQ,CAACO,UAAZ,GAAyB,IAAvE;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAEE,QAAC,OAAD;AAAS,QAAA,EAAE,EAAC,cAAZ;AAAA,+BACE;AAAQ,UAAA,SAAS,EAAC,yBAAlB;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAUE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,6BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAVF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CA/BD;;GAAMV,I;UAC4BP,W;;;KAD5BO,I;AAiCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!authState.isAuthenticated) {\r\n // When user isn't authenticated, forget any user info\r\n setUserInfo(null);\r\n } else {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n }\r\n }, [authState, oktaAuth]); // Update if authState changes\r\n\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo ? userInfo.given_name : null}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims;\n useEffect(() => {\n setUserInfo(idToken);\n console.log(userInfo);\n }, []);\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: \"Welcome!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"Loading...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","idToken","JSON","parse","localStorage","getItem","claims","console","log"],"mappings":";;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A;AADF;AAAA;AAAA;AAAA;AAAA,cAVF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CAtCD;;GAAMH,I;UAC4BP,W;;;KAD5BO,I;AAwCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims\r\n\r\n useEffect(() => {\r\n setUserInfo(idToken)\r\n console.log(userInfo)\r\n }, [])\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>Loading...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims;\n useEffect(() => {\n setUserInfo(idToken);\n }, []);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 18,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","idToken","JSON","parse","localStorage","getItem","claims","name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AACA,QAAMU,OAAO,GAAGC,IAAI,CAACC,KAAL,CAAWC,YAAY,CAACC,OAAb,CAAqB,oBAArB,CAAX,EAAuDJ,OAAvD,CAA+DK,MAA/E;AAEAd,EAAAA,SAAS,CAAC,MAAM;AACdQ,IAAAA,WAAW,CAACC,OAAD,CAAX;AACD,GAFQ,EAEN,EAFM,CAAT;AAIA,sBACE;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,gBAAf;AAAA,8BACE;AAAI,QAAA,SAAS,EAAC,cAAd;AAAA,+BAAsCF,QAAQ,CAACQ,IAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAEE,QAAC,OAAD;AAAS,QAAA,EAAE,EAAC,cAAZ;AAAA,+BACE;AAAQ,UAAA,SAAS,EAAC,yBAAlB;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAUE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,6BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAVF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CAzBD;;GAAMX,I;UAC4BP,W;;;KAD5BO,I;AA2BN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims\r\n\r\n useEffect(() => {\r\n setUserInfo(idToken)\r\n }, [])\r\n\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n if (!authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n }\n }, [authState, oktaAuth]); // Update if authState changes\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\" \", userInfo ? \"Weclome\" + userInfo.given_name + \"!\" : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","isAuthenticated","token","getUserInfo","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACK,SAAS,CAACI,eAAf,EAAgC;AAC9B;AACAD,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACI,KAAT,CAAeC,WAAf,GAA6BC,IAA7B,CAAkCC,IAAI,IAAI;AACxCL,QAAAA,WAAW,CAACK,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACR,SAAD,EAAYC,QAAZ,CATM,CAAT,CAJiB,CAaU;;AAE3B,sBACE;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,gBAAf;AAAA,8BACE;AAAI,QAAA,SAAS,EAAC,cAAd;AAAA,wBAA+BC,QAAQ,GAAG,YAAYA,QAAQ,CAACO,UAArB,GAAkC,GAArC,GAA2C,IAAlF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAEE,QAAC,OAAD;AAAS,QAAA,EAAE,EAAC,cAAZ;AAAA,+BACE;AAAQ,UAAA,SAAS,EAAC,yBAAlB;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAUE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,6BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAVF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CA/BD;;GAAMV,I;UAC4BP,W;;;KAD5BO,I;AAiCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!authState.isAuthenticated) {\r\n // When user isn't authenticated, forget any user info\r\n setUserInfo(null);\r\n } else {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n }\r\n }, [authState, oktaAuth]); // Update if authState changes\r\n\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\"> {userInfo ? \"Weclome\" + userInfo.given_name + \"!\" : null}</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims;\n useEffect(() => {\n setUserInfo(idToken);\n });\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"Loading...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","idToken","JSON","parse","localStorage","getItem","claims","given_name"],"mappings":";;;AAAA,SAASA,WAAT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AAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CArCD;;GAAMX,I;UAC4BP,W;;;KAD5BO,I;AAuCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims\r\n\r\n useEffect(() => {\r\n setUserInfo(idToken)\r\n })\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>Loading...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n if (!authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n }\n }, [authState, oktaAuth]); // Update if authState changes\n\n if (!userInfo === null) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this);\n } else {\n return null;\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","isAuthenticated","token","getUserInfo","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACK,SAAS,CAACI,eAAf,EAAgC;AAC9B;AACAD,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACI,KAAT,CAAeC,WAAf,GAA6BC,IAA7B,CAAkCC,IAAI,IAAI;AACxCL,QAAAA,WAAW,CAACK,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACR,SAAD,EAAYC,QAAZ,CATM,CAAT,CAJiB,CAaU;;AAE3B,MAAI,CAACC,QAAD,KAAc,IAAlB,EAAwB;AACtB,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAAC,gBAAf;AAAA,gCACE;AAAI,UAAA,SAAS,EAAC,cAAd;AAAA,iCAAsCA,QAAQ,CAACO,UAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE,QAAC,OAAD;AAAS,UAAA,EAAE,EAAC,cAAZ;AAAA,iCACE;AAAQ,YAAA,SAAS,EAAC,yBAAlB;AAAA,oCACE,QAAC,eAAD;AAAiB,cAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,oBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAUE;AAAK,QAAA,SAAS,EAAC,kBAAf;AAAA,+BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAVF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,WAAO,IAAP;AACD;AAGF,CAvCD;;GAAMV,I;UAC4BP,W;;;KAD5BO,I;AAyCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!authState.isAuthenticated) {\r\n // When user isn't authenticated, forget any user info\r\n setUserInfo(null);\r\n } else {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n }\r\n }, [authState, oktaAuth]); // Update if authState changes\r\n\r\n if (!userInfo === null) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return null\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims;\n useEffect(() => {\n setUserInfo(idToken);\n }, []);\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: \"Welcome!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"Loading...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","idToken","JSON","parse","localStorage","getItem","claims"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OA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A,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CArCD;;GAAMH,I;UAC4BP,W;;;KAD5BO,I;AAuCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n const idToken = JSON.parse(localStorage.getItem('okta-token-storage')).idToken.claims\r\n\r\n useEffect(() => {\r\n setUserInfo(idToken)\r\n }, [])\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>Loading...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n useEffect(() => {\n oktaAuth.token.getUserInfo().then(info => {\n setUserInfo(info);\n });\n });\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }, this);\n } else {\n return null;\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","token","getUserInfo","then","info","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BT,WAAW,EAA3C;AACA,QAAM,CAACU,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AAEAC,EAAAA,SAAS,CAAC,MAAM;AACdM,IAAAA,QAAQ,CAACG,KAAT,CAAeC,WAAf,GAA6BC,IAA7B,CAAkCC,IAAI,IAAI;AACxCJ,MAAAA,WAAW,CAACI,IAAD,CAAX;AACD,KAFD;AAGD,GAJQ,CAAT;;AAMA,MAAIL,QAAJ,EAAc;AACZ,wBACE;AAAK,MAAA,SAAS,EAAC,oBAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAAC,gBAAf;AAAA,gCACE;AAAI,UAAA,SAAS,EAAC,cAAd;AAAA,iCAAsCA,QAAQ,CAACM,UAA/C;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE,QAAC,OAAD;AAAS,UAAA,EAAE,EAAC,cAAZ;AAAA,iCACE;AAAQ,YAAA,SAAS,EAAC,yBAAlB;AAAA,oCACE,QAAC,eAAD;AAAiB,cAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,oBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAUE;AAAK,QAAA,SAAS,EAAC,kBAAf;AAAA,+BACE,QAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAVF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AAiBD,GAlBD,MAmBK;AACH,WAAO,IAAP;AACD;AAGF,CAlCD;;GAAMT,I;UAC4BP,W;;;KAD5BO,I;AAoCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n useEffect(() => {\r\n oktaAuth.token.getUserInfo().then(info => {\r\n setUserInfo(info);\r\n });\r\n })\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return null\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\project\\\\projectOverview\\\\ProjectOverview.jsx\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport { NavLink } from \"react-router-dom\";\nimport \"./ProjectOverview.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst ProjectOverview = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }, {\n name: \"Teskeholdet\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [sharedProjectsButtonState, setSharedProjectsButtonState] = useState(true);\n const [personalProjectsButtonState, setPersonalProjectsButtonState] = useState(false);\n\n const SharedProjectsButtonActive = () => {\n setSharedProjectsButtonState(true);\n setPersonalProjectsButtonState(false);\n };\n\n const PersonalProjectsButtonActive = () => {\n setSharedProjectsButtonState(false);\n setPersonalProjectsButtonState(true);\n };\n\n const ProjectsDisplay = projects => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectlist\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n children: projects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"project-entry\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"project-team-name\",\n children: /*#__PURE__*/_jsxDEV(NavLink, {\n to: `/projects/${projects[index].id}`,\n children: [projects[index].id, \"\\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n className: \"icon\",\n icon: \"chevron-right\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 21\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"project-status-info-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"new-issues-info\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n className: \"icon\",\n icon: \"bug\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 21\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n children: \"0\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 21\n }, this), /*#__PURE__*/_jsxDEV(\"span\", {\n className: \"tooltip-text\",\n children: \"Total issues\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 21\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 19\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"issues-solved-info\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n className: \"icon\",\n icon: \"check\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 21\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n children: \"0\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 21\n }, this), /*#__PURE__*/_jsxDEV(\"span\", {\n className: \"tooltip-text\",\n children: \"Issues solved\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 21\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 19\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"last-updated-info\",\n children: /*#__PURE__*/_jsxDEV(\"p\", {\n children: \"Last updated: \\xA01 day ago\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 19\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 13\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"projectlist-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"projectlist-title\",\n children: \"Your Projects\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"create-new-project-button\",\n children: \"New Project\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"project-sort-menu-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"personal-shared-projects-container\",\n children: [/*#__PURE__*/_jsxDEV(\"a\", {\n className: sharedProjectsButtonState ? \"activeUnderlined\" : \"inactive\",\n onClick: SharedProjectsButtonActive,\n children: \"Shared Projects\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n className: personalProjectsButtonState ? \"activeUnderlined\" : \"inactive\",\n onClick: PersonalProjectsButtonActive,\n children: \"Personal Projects\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"project-sort-select-container\",\n children: [/*#__PURE__*/_jsxDEV(\"p\", {\n children: \"Sort by:\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 79,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"select\", {\n children: [/*#__PURE__*/_jsxDEV(\"option\", {\n children: \"Last updated\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 81,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"option\", {\n children: \"Last created\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 82,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"option\", {\n children: \"Name\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 83,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"option\", {\n children: \"Name descending\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 84,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"option\", {\n children: \"Oldest created\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 85,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"option\", {\n children: \"Oldest updated\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 86,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 7\n }, this), sharedProjectsButtonState ? ProjectsDisplay(sharedProjects) : ProjectsDisplay(personalProjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 5\n }, this);\n};\n\n_s(ProjectOverview, \"WjKsI8a5YElUZRAaBk97zXZAzsg=\");\n\n_c = ProjectOverview;\nexport default ProjectOverview;\n\nvar _c;\n\n$RefreshReg$(_c, \"ProjectOverview\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/project/projectOverview/ProjectOverview.jsx"],"names":["React","useState","NavLink","FontAwesomeIcon","ProjectOverview","personalProjects","id","type","sharedProjects","teams","name","sharedProjectsButtonState","setSharedProjectsButtonState","personalProjectsButtonState","setPersonalProjectsButtonState","SharedProjectsButtonActive","PersonalProjectsButtonActive","ProjectsDisplay","projects","map","elements","index"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,uBAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,eAAe,GAAG,MAAM;AAAA;;AAC5B,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD,EAAmC;AAAEA,MAAAA,IAAI,EAAE;AAAR,KAAnC;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAM,CAACC,yBAAD,EAA4BC,4BAA5B,IAA4DX,QAAQ,CAAC,IAAD,CAA1E;A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AAEF,2BAA2B,GAAG,kBAAH,GAAwB,UAAjE;AAA6E,UAAA,OAAO,EAAEG,4BAAtF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAKE;AAAK,QAAA,SAAS,EAAC,+BAAf;AAAA,gCACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE;AAAA,kCACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAHF,eAIE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAJF,eAKE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBALF,eAME;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBANF;AAAA;AAAA;AAAA;AAAA;AAAA,gBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA,YAPF,EAwBGL,yBAAyB,GAAGM,eAAe,CAACT,cAAD,CAAlB,GAAqCS,eAAe,CAACZ,gBAAD,CAxBhF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AA4BD,CAvFD;;GAAMD,e;;KAAAA,e;AAyFN,eAAeA,eAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport { NavLink } from \"react-router-dom\";\r\nimport \"./ProjectOverview.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst ProjectOverview = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }, { name: \"Teskeholdet\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [sharedProjectsButtonState, setSharedProjectsButtonState] = useState(true);\r\n const [personalProjectsButtonState, setPersonalProjectsButtonState] = useState(false);\r\n\r\n const SharedProjectsButtonActive = () => {\r\n setSharedProjectsButtonState(true);\r\n setPersonalProjectsButtonState(false);\r\n };\r\n\r\n const PersonalProjectsButtonActive = () => {\r\n setSharedProjectsButtonState(false);\r\n setPersonalProjectsButtonState(true);\r\n };\r\n\r\n const ProjectsDisplay = (projects) => {\r\n return (\r\n <div className=\"projectlist\">\r\n <ul>\r\n {projects.map((elements, index) => (\r\n <li>\r\n <div className=\"project-entry\">\r\n <div className=\"project-team-name\">\r\n <NavLink to={`/projects/${projects[index].id}`}>{projects[index].id}&nbsp;\r\n <FontAwesomeIcon className=\"icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </NavLink>\r\n </div>\r\n <div className=\"project-status-info-container\">\r\n <div className=\"new-issues-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"bug\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Total issues</span>\r\n </div>\r\n <div className=\"issues-solved-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"check\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Issues solved</span>\r\n </div>\r\n <div className=\"last-updated-info\">\r\n <p>Last updated: &nbsp;1 day ago</p>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"projectlist-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"projectlist-title\">Your Projects</h2>\r\n <button className=\"create-new-project-button\">\r\n New Project\r\n </button>\r\n </div>\r\n <div className=\"project-sort-menu-container\">\r\n <div className=\"personal-shared-projects-container\">\r\n <a className={sharedProjectsButtonState ? \"activeUnderlined\" : \"inactive\"} onClick={SharedProjectsButtonActive}>Shared Projects</a>\r\n <a className={personalProjectsButtonState ? \"activeUnderlined\" : \"inactive\"} onClick={PersonalProjectsButtonActive}>Personal Projects</a>\r\n </div>\r\n <div className=\"project-sort-select-container\">\r\n <p>Sort by:</p>\r\n <select>\r\n <option>Last updated</option>\r\n <option>Last created</option>\r\n <option>Name</option>\r\n <option>Name descending</option>\r\n <option>Oldest created</option>\r\n <option>Oldest updated</option>\r\n </select>\r\n </div>\r\n </div>\r\n {sharedProjectsButtonState ? ProjectsDisplay(sharedProjects) : ProjectsDisplay(personalProjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default ProjectOverview"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\home\\\\Home.jsx\",\n _s = $RefreshSig$();\n\nimport { useOktaAuth } from \"@okta/okta-react\";\nimport React, { useState, useEffect } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport \"./Home.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Updates from './updates/Updates';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Home = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const tokenId = JSON.parse(localStorage.getItem('okta-token-storage'));\n useEffect(() => {\n console.log(tokenId.tokenId.claims);\n });\n\n if (userInfo) {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"content-header\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n className: \"welcome-text\",\n children: [\"Welcome \", userInfo.given_name, \"!\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/reportissue\",\n children: /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"report-new-issue-button\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"exclamation-triangle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 15\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-content\",\n children: /*#__PURE__*/_jsxDEV(Updates, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"homepage-container\",\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"Loading...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 7\n }, this);\n }\n};\n\n_s(Home, \"/7FunoA1ejJNU8uKGTy1GZFqU2I=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = Home;\nexport default Home;\n\nvar _c;\n\n$RefreshReg$(_c, \"Home\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/home/Home.jsx"],"names":["useOktaAuth","React","useState","useEffect","NavLink","FontAwesomeIcon","Updates","Home","authState","oktaAuth","userInfo","setUserInfo","tokenId","JSON","parse","localStorage","getItem","console","log","claims","given_name"],"mappings":";;;AAAA,SAASA,WAAT,QAA4B,kBAA5B;AACA,OAAOC,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QA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AAK,MAAA,SAAS,EAAC,oBAAf;AAAA,6BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAKD;AAGF,CArCD;;GAAMb,I;UAC4BP,W;;;KAD5BO,I;AAuCN,eAAeA,IAAf","sourcesContent":["import { useOktaAuth } from \"@okta/okta-react\";\r\nimport React, { useState, useEffect } from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Home.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Updates from './updates/Updates'\r\n\r\nconst Home = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n const tokenId = JSON.parse(localStorage.getItem('okta-token-storage'))\r\n\r\n useEffect(() => {\r\n console.log(tokenId.tokenId.claims)\r\n })\r\n\r\n if (userInfo) {\r\n return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome {userInfo.given_name}!</h2>\r\n <NavLink to=\"/reportissue\">\r\n <button className=\"report-new-issue-button\">\r\n <FontAwesomeIcon icon=\"exclamation-triangle\"></FontAwesomeIcon>\r\n &nbsp;&nbsp;Report issues\r\n </button>\r\n </NavLink>\r\n </div>\r\n <div className=\"homepage-content\">\r\n <Updates />\r\n </div>\r\n </div>\r\n )\r\n\r\n }\r\n else {\r\n return (\r\n <div className=\"homepage-container\">\r\n <h3>Loading...</h3>\r\n </div>\r\n )\r\n }\r\n\r\n\r\n}\r\n\r\nexport default Home"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment