1b8c97b732b009ccd4206e5507e1ee10.json 8.52 KB
Newer Older
1
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\App.jsx\",\n    _s = $RefreshSig$();\n\nimport React from \"react\";\nimport { Route, Switch, useHistory } from \"react-router-dom\";\nimport { library } from '@fortawesome/fontawesome-svg-core';\nimport { fas } from '@fortawesome/free-solid-svg-icons';\nimport { OktaAuth, toRelativeUrl } from '@okta/okta-auth-js';\nimport { Security, SecureRoute, LoginCallback } from \"@okta/okta-react\";\nimport \"./style.css\";\nimport config from \"./config\"; //Components\n\nimport Login from \"./components/login/Login\";\nimport Navbar from \"./components/navbar/Navbar\";\nimport Home from \"./components/home/Home\";\nimport ReportForm from \"./components/reportForm/ReportForm\";\nimport ProjectOverview from \"./components/project/projectOverview/ProjectOverview\";\nimport ProjectInfo from \"./components/project/projectInfo/ProjectInfo\";\nimport TeamOverview from \"./components/team/teamOverview/TeamOverview\";\nimport TeamInfo from \"./components/team/teamInfo/TeamInfo\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nlibrary.add(fas);\nconst oktaAuth = new OktaAuth(config.oidc);\nconst CALLBACK_PATH = '/login/callback';\n\nconst App = () => {\n  _s();\n\n  const {\n    authState,\n    oktaAuth\n  } = useOktaAuth();\n  const history = useHistory();\n\n  const restoreOriginalUri = async (_oktaAuth, originalUri) => {\n    history.replace(toRelativeUrl(originalUri || '/', window.location.origin));\n  };\n\n  return /*#__PURE__*/_jsxDEV(Security, {\n    oktaAuth: oktaAuth,\n    restoreOriginalUri: restoreOriginalUri,\n    children: [/*#__PURE__*/_jsxDEV(Navbar, {}, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 34,\n      columnNumber: 7\n    }, this), /*#__PURE__*/_jsxDEV(Switch, {\n      children: [/*#__PURE__*/_jsxDEV(Route, {\n        path: \"/\",\n        exact: true,\n        component: Login\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 36,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(Route, {\n        path: CALLBACK_PATH,\n        component: LoginCallback\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 37,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n        path: \"/home\",\n        component: Home\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 38,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n        path: \"/reportissue\",\n        component: ReportForm\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 39,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n        path: \"/projects\",\n        component: ProjectOverview\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 40,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n        path: \"/ReactApp\",\n        component: ProjectInfo\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 41,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n        path: \"/teams\",\n        component: TeamOverview\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 42,\n        columnNumber: 9\n      }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n        path: \"/HenriksMemeMachine\",\n        component: TeamInfo\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 43,\n        columnNumber: 9\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 35,\n      columnNumber: 7\n    }, this)]\n  }, void 0, true, {\n    fileName: _jsxFileName,\n    lineNumber: 33,\n    columnNumber: 5\n  }, this);\n};\n\n_s(App, \"gN2vl07t+HjO0zaRWUqe1tMASe8=\", true, function () {\n  return [useHistory];\n});\n\n_c = App;\nexport default App;\n\nvar _c;\n\n$RefreshReg$(_c, \"App\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/App.jsx"],"names":["React","Route","Switch","useHistory","library","fas","OktaAuth","toRelativeUrl","Security","SecureRoute","LoginCallback","config","Login","Navbar","Home","ReportForm","ProjectOverview","ProjectInfo","TeamOverview","TeamInfo","add","oktaAuth","oidc","CALLBACK_PATH","App","authState","useOktaAuth","history","restoreOriginalUri","_oktaAuth","originalUri","replace","window","location","origin"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,KAAT,EAAgBC,MAAhB,EAAwBC,UAAxB,QAA0C,kBAA1C;AACA,SAASC,OAAT,QAAwB,mCAAxB;AACA,SAASC,GAAT,QAAoB,mCAApB;AACA,SAASC,QAAT,EAAmBC,aAAnB,QAAwC,oBAAxC;AACA,SAASC,QAAT,EAAmBC,WAAnB,EAAgCC,aAAhC,QAAqD,kBAArD;AACA,OAAO,aAAP;AACA,OAAOC,MAAP,MAAmB,UAAnB,C,CAEA;;AACA,OAAOC,KAAP,MAAkB,0BAAlB;AACA,OAAOC,MAAP,MAAmB,4BAAnB;AACA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,UAAP,MAAuB,oCAAvB;AACA,OAAOC,eAAP,MAA4B,sDAA5B;AACA,OAAOC,WAAP,MAAwB,8CAAxB;AACA,OAAOC,YAAP,MAAyB,6CAAzB;AACA,OAAOC,QAAP,MAAqB,qCAArB;;AAEAf,OAAO,CAACgB,GAAR,CAAYf,GAAZ;AAEA,MAAMgB,QAAQ,GAAG,IAAIf,QAAJ,CAAaK,MAAM,CAACW,IAApB,CAAjB;AACA,MAAMC,aAAa,GAAG,iBAAtB;;AAEA,MAAMC,GAAG,GAAG,MAAM;AAAA;;AAChB,QAAM;AAAEC,IAAAA,SAAF;AAAaJ,IAAAA;AAAb,MAA0BK,WAAW,EAA3C;AACA,QAAMC,OAAO,GAAGxB,UAAU,EAA1B;;AACA,QAAMyB,kBAAkB,GAAG,OAAOC,SAAP,EAAkBC,WAA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AAAA,cARF;AAAA;AAAA;AAAA;AAAA;AAAA,YAFF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAeD,CAtBD;;GAAMK,G;UAEYrB,U;;;KAFZqB,G;AAwBN,eAAeA,GAAf","sourcesContent":["import React from \"react\"\r\nimport { Route, Switch, useHistory } from \"react-router-dom\"\r\nimport { library } from '@fortawesome/fontawesome-svg-core'\r\nimport { fas } from '@fortawesome/free-solid-svg-icons'\r\nimport { OktaAuth, toRelativeUrl } from '@okta/okta-auth-js';\r\nimport { Security, SecureRoute, LoginCallback } from \"@okta/okta-react\"\r\nimport \"./style.css\"\r\nimport config from \"./config\"\r\n\r\n//Components\r\nimport Login from \"./components/login/Login\"\r\nimport Navbar from \"./components/navbar/Navbar\"\r\nimport Home from \"./components/home/Home\"\r\nimport ReportForm from \"./components/reportForm/ReportForm\"\r\nimport ProjectOverview from \"./components/project/projectOverview/ProjectOverview\"\r\nimport ProjectInfo from \"./components/project/projectInfo/ProjectInfo\"\r\nimport TeamOverview from \"./components/team/teamOverview/TeamOverview\"\r\nimport TeamInfo from \"./components/team/teamInfo/TeamInfo\"\r\n\r\nlibrary.add(fas)\r\n\r\nconst oktaAuth = new OktaAuth(config.oidc);\r\nconst CALLBACK_PATH = '/login/callback';\r\n\r\nconst App = () => {\r\n  const { authState, oktaAuth } = useOktaAuth();\r\n  const history = useHistory()\r\n  const restoreOriginalUri = async (_oktaAuth, originalUri) => {\r\n    history.replace(toRelativeUrl(originalUri || '/', window.location.origin))\r\n  }\r\n\r\n  return (\r\n    <Security oktaAuth={oktaAuth} restoreOriginalUri={restoreOriginalUri}>\r\n      <Navbar />\r\n      <Switch>\r\n        <Route path=\"/\" exact component={Login} />\r\n        <Route path={CALLBACK_PATH} component={LoginCallback} />\r\n        <SecureRoute path=\"/home\" component={Home} />\r\n        <SecureRoute path=\"/reportissue\" component={ReportForm} />\r\n        <SecureRoute path=\"/projects\" component={ProjectOverview} />\r\n        <SecureRoute path=\"/ReactApp\" component={ProjectInfo} />\r\n        <SecureRoute path=\"/teams\" component={TeamOverview} />\r\n        <SecureRoute path=\"/HenriksMemeMachine\" component={TeamInfo} />\r\n      </Switch>\r\n    </Security>\r\n  )\r\n}\r\n\r\nexport default App"]},"metadata":{},"sourceType":"module"}