2854f67eb870a0581e9d33db2f9ad5d9.json 5.12 KB
Newer Older
1
{"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  oktaAuth.token.getUserInfo().then(info => {\n    setUserInfo(info);\n  });\n  console.log(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: 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, \"8yuPb+f/kHytdzQyGlcPn6/UuWY=\", 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","console","log"],"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;AAEAO,EAAAA,QAAQ,CAACG,KAAT,CAAeC,WAAf,GAA6BC,IAA7B,CAAkCC,IAAI,IAAI;AACxCJ,IAAAA,WAAW,CAACI,IAAD,CAAX;AACD,GAFD;AAIAC,EAAAA,OAAO,CAACC,GAAR,CAAYP,QAAZ;AAEA,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,CA1BD;;GAAMH,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  oktaAuth.token.getUserInfo().then(info => {\r\n    setUserInfo(info)\r\n  })\r\n\r\n  console.log(userInfo)\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"}