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

Merge branch 'addLogin' into 'master'

Add login

See merge request au593919/pipit!1
parents 0d588800 2c3853a1
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# misc # misc
.DS_Store .DS_Store
.env
.env.local .env.local
.env.development.local .env.development.local
.env.test.local .env.test.local
......
This diff is collapsed.
{"ast":null,"code":"import basePick from './_basePick.js';\nimport flatRest from './_flatRest.js';\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n\nvar pick = flatRest(function (object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\nexport default pick;","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/lodash-es/pick.js"],"names":["basePick","flatRest","pick","object","paths"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gBAArB;AACA,OAAOC,QAAP,MAAqB,gBAArB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAIC,IAAI,GAAGD,QAAQ,CAAC,UAASE,MAAT,EAAiBC,KAAjB,EAAwB;AAC1C,SAAOD,MAAM,IAAI,IAAV,GAAiB,EAAjB,GAAsBH,QAAQ,CAACG,MAAD,EAASC,KAAT,CAArC;AACD,CAFkB,CAAnB;AAIA,eAAeF,IAAf","sourcesContent":["import basePick from './_basePick.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nexport default pick;\n"]},"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(\"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\\\\App.jsx\",\n _s = $RefreshSig$();\n\nimport React from \"react\";\nimport { Route, Switch, useHistory } from \"react-router-dom\";\nimport { useOktaAuth } from '@okta/okta-react';\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 \"./pages/login/Login\";\nimport Navbar from \"./components/navbar/Navbar\";\nimport Home from \"./pages/home/Home\";\nimport ReportForm from \"./pages/reportForm/ReportForm\";\nimport ProjectOverview from \"./pages/project/projectOverview/ProjectOverview\";\nimport ProjectInfo from \"./pages/project/projectInfo/ProjectInfo\";\nimport TeamOverview from \"./pages/team/teamOverview/TeamOverview\";\nimport TeamInfo from \"./pages/team/teamInfo/TeamInfo\";\nimport Messages from \"./pages/Messages/Messages\";\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 history = useHistory();\n const {\n authState\n } = oktaAuth.isAuthenticated;\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: 36,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Switch, {\n children: [/*#__PURE__*/_jsxDEV(Route, {\n exact: true,\n path: \"/\",\n component: Login\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Route, {\n path: CALLBACK_PATH,\n component: LoginCallback\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n path: \"/home\",\n component: Home\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n path: \"/reportissue\",\n component: ReportForm\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n path: \"/projects\",\n component: ProjectOverview\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n path: \"/ReactApp\",\n component: ProjectInfo\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n path: \"/teams\",\n component: TeamOverview\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n path: \"/HenriksMemeMachine\",\n component: TeamInfo\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SecureRoute, {\n path: \"/messages\",\n component: Messages\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 5\n }, this);\n};\n\n_s(App, \"9cZfZ04734qoCGIctmKX7+sX6eU=\", false, 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","useOktaAuth","library","fas","OktaAuth","toRelativeUrl","Security","SecureRoute","LoginCallback","config","Login","Navbar","Home","ReportForm","ProjectOverview","ProjectInfo","TeamOverview","TeamInfo","Messages","add","oktaAuth","oidc","CALLBACK_PATH","App","history","authState","isAuthenticated","restoreOriginalUri","_oktaAuth","originalUri","replace","window","location","origin"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,KAAT,EAAgBC,MAAhB,EAAwBC,UAAxB,QAA0C,kBAA1C;AACA,SAASC,WAAT,QAA4B,kBAA5B;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,CA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C,WAAD;AAAa,QAAA,IAAI,EAAC,OAAlB;AAA0B,QAAA,SAAS,EAAEI;AAArC;AAAA;AAAA;AAAA;AAAA,cAHF,eAIE,QAAC,WAAD;AAAa,QAAA,IAAI,EAAC,cAAlB;AAAiC,QAAA,SAAS,EAAEC;AAA5C;AAAA;AAAA;AAAA;AAAA,cAJF,eAKE,QAAC,WAAD;AAAa,QAAA,IAAI,EAAC,WAAlB;AAA8B,QAAA,SAAS,EAAEC;AAAzC;AAAA;AAAA;AAAA;AAAA,cALF,eAME,QAAC,WAAD;AAAa,QAAA,IAAI,EAAC,WAAlB;AAA8B,QAAA,SAAS,EAAEC;AAAzC;AAAA;AAAA;AAAA;AAAA,cANF,eAOE,QAAC,WAAD;AAAa,QAAA,IAAI,EAAC,QAAlB;AAA2B,QAAA,SAAS,EAAEC;AAAtC;AAAA;AAAA;AAAA;AAAA,cAPF,eAQE,QAAC,WAAD;AAAa,QAAA,IAAI,EAAC,qBAAlB;AAAwC,QAAA,SAAS,EAAEC;AAAnD;AAAA;AAAA;AAAA;AAAA,cARF,eASE,QAAC,WAAD;AAAa,QAAA,IAAI,EAAC,WAAlB;AAA8B,QAAA,SAAS,EAAEC;AAAzC;AAAA;AAAA;AAAA;AAAA,cATF;AAAA;AAAA;AAAA;AAAA;AAAA,YAFF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CAvBD;;GAAMK,G;UACYvB,U;;;KADZuB,G;AAyBN,eAAeA,GAAf","sourcesContent":["import React from \"react\"\r\nimport { Route, Switch, useHistory } from \"react-router-dom\"\r\nimport { useOktaAuth } from '@okta/okta-react';\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 \"./pages/login/Login\"\r\nimport Navbar from \"./components/navbar/Navbar\"\r\nimport Home from \"./pages/home/Home\"\r\nimport ReportForm from \"./pages/reportForm/ReportForm\"\r\nimport ProjectOverview from \"./pages/project/projectOverview/ProjectOverview\"\r\nimport ProjectInfo from \"./pages/project/projectInfo/ProjectInfo\"\r\nimport TeamOverview from \"./pages/team/teamOverview/TeamOverview\"\r\nimport TeamInfo from \"./pages/team/teamInfo/TeamInfo\"\r\nimport Messages from \"./pages/Messages/Messages\"\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 history = useHistory()\r\n const { authState } = oktaAuth.isAuthenticated\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 exact path=\"/\" 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 <SecureRoute path=\"/messages\" component={Messages} />\r\n </Switch>\r\n </Security>\r\n )\r\n}\r\n\r\nexport default App"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\n\nvar combineURLs = require('../helpers/combineURLs');\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\n\n\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n\n return requestedURL;\n};","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/axios/lib/core/buildFullPath.js"],"names":["isAbsoluteURL","require","combineURLs","module","exports","buildFullPath","baseURL","requestedURL"],"mappings":"AAAA;;AAEA,IAAIA,aAAa,GAAGC,OAAO,CAAC,0BAAD,CAA3B;;AACA,IAAIC,WAAW,GAAGD,OAAO,CAAC,wBAAD,CAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACAE,MAAM,CAACC,OAAP,GAAiB,SAASC,aAAT,CAAuBC,OAAvB,EAAgCC,YAAhC,EAA8C;AAC7D,MAAID,OAAO,IAAI,CAACN,aAAa,CAACO,YAAD,CAA7B,EAA6C;AAC3C,WAAOL,WAAW,CAACI,OAAD,EAAUC,YAAV,CAAlB;AACD;;AACD,SAAOA,YAAP;AACD,CALD","sourcesContent":["'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n"]},"metadata":{},"sourceType":"script"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\App.jsx\";\nimport React from \"react\";\nimport { BrowserRouter as Router, Route } from \"react-router-dom\";\nimport { library } from '@fortawesome/fontawesome-svg-core';\nimport { fas } from '@fortawesome/free-solid-svg-icons'; //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);\n\nconst App = () => /*#__PURE__*/_jsxDEV(Router, {\n children: [/*#__PURE__*/_jsxDEV(Navbar, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 5\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: 24,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Route, {\n path: \"/home\",\n component: Home\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Route, {\n path: \"/reportissue\",\n component: ReportForm\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Route, {\n path: \"/projects\",\n component: ProjectOverview\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Route, {\n path: \"/ReactApp\",\n component: ProjectInfo\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Route, {\n path: \"/teams\",\n component: TeamOverview\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Route, {\n path: \"/teams/HenriksMemeMachine\",\n component: TeamInfo\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }, this)]\n}, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 3\n}, this);\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","BrowserRouter","Router","Route","library","fas","Login","Navbar","Home","ReportForm","ProjectOverview","ProjectInfo","TeamOverview","TeamInfo","add","App"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAa,IAAIC,MAA1B,EAAkCC,KAAlC,QAA+C,kBAA/C;AACA,SAASC,OAAT,QAAwB,mCAAxB;AACA,SAASC,GAAT,QAAoB,mCAApB,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;;AAGAT,OAAO,CAACU,GAAR,CAAYT,GAAZ;;AAEA,MAAMU,GAAG,GAAG,mBAEV,QAAC,MAAD;AAAA,0BACE,QAAC,MAAD;AAAA;AAAA;AAAA;AAAA,UADF,eAEE;AAAA,4BACE,QAAC,KAAD;AAAO,MAAA,IAAI,EAAC,GAAZ;AAAgB,MAAA,KAAK,MAArB;AAAsB,MAAA,SAAS,EAAET;AAAjC;AAAA;AAAA;AAAA;AAAA,YADF,eAEE,QAAC,KAAD;AAAO,MAAA,IAAI,EAAC,OAAZ;AAAoB,MAAA,SAAS,EAAEE;AAA/B;AAAA;AAAA;AAAA;AAAA,YAFF,eAGE,QAAC,KAAD;AAAO,MAAA,IAAI,EAAC,cAAZ;AAA2B,MAAA,SAAS,EAAEC;AAAtC;AAAA;AAAA;AAAA;AAAA,YAHF,eAIE,QAAC,KAAD;AAAO,MAAA,IAAI,EAAC,WAAZ;AAAwB,MAAA,SAAS,EAAEC;AAAnC;AAAA;AAAA;AAAA;AAAA,YAJF,eAKE,QAAC,KAAD;AAAO,MAAA,IAAI,EAAC,WAAZ;AAAwB,MAAA,SAAS,EAAEC;AAAnC;AAAA;AAAA;AAAA;AAAA,YALF,eAME,QAAC,KAAD;AAAO,MAAA,IAAI,EAAC,QAAZ;AAAqB,MAAA,SAAS,EAAEC;AAAhC;AAAA;AAAA;AAAA;AAAA,YANF,eAOE,QAAC,KAAD;AAAO,MAAA,IAAI,EAAC,2BAAZ;AAAwC,MAAA,SAAS,EAAEC;AAAnD;AAAA;AAAA;AAAA;AAAA,YAPF;AAAA;AAAA;AAAA;AAAA;AAAA,UAFF;AAAA;AAAA;AAAA;AAAA;AAAA,QAFF;;KAAME,G;AAgBN,eAAeA,GAAf","sourcesContent":["import React from \"react\"\nimport { BrowserRouter as Router, Route } from \"react-router-dom\"\nimport { library } from '@fortawesome/fontawesome-svg-core'\nimport { fas } from '@fortawesome/free-solid-svg-icons'\n\n//Components\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\"\n\n\nlibrary.add(fas)\n\nconst App = () => (\n\n <Router>\n <Navbar />\n <switch>\n <Route path=\"/\" exact component={Login} />\n <Route path=\"/home\" component={Home} />\n <Route path=\"/reportissue\" component={ReportForm} />\n <Route path=\"/projects\" component={ProjectOverview} />\n <Route path=\"/ReactApp\" component={ProjectInfo} />\n <Route path=\"/teams\" component={TeamOverview} />\n <Route path=\"/teams/HenriksMemeMachine\" component={TeamInfo} />\n </switch>\n </Router >\n)\n\nexport default App"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\pages\\\\login\\\\passwordReset\\\\PasswordForgotModal.jsx\",\n _s = $RefreshSig$();\n\nimport React, { useState, useRef, useEffect } from 'react';\nimport config from '../../../config';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport \"./PasswordForgotModal.css\";\nimport MessageModal from '../../../components/messageModal/MessageModal';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst PasswordForgotModal = () => {\n _s();\n\n const [forgotPasswordFormVisibilityState, setForgotPasswordFormVisibilityState] = useState(false);\n const forgotPasswordFormRef = useRef(null);\n\n const toggleForgotPasswordFormVisible = () => setForgotPasswordFormVisibilityState(!forgotPasswordFormVisibilityState);\n\n const [submitOkMessageModalState, setSubmitOkMessageModalState] = useState(false);\n const [username, setUsername] = useState('');\n\n const handleUsernameChange = e => {\n setUsername(e.target.value);\n };\n\n useEffect(() => {\n const pageClickEvent = e => {\n if (forgotPasswordFormRef.current !== null && !forgotPasswordFormRef.current.contains(e.target)) {\n toggleForgotPasswordFormVisible();\n }\n }; // If the item is active (ie open) then listen for clicks\n\n\n if (forgotPasswordFormVisibilityState) {\n window.addEventListener('click', pageClickEvent);\n }\n\n return () => {\n window.removeEventListener('click', pageClickEvent);\n };\n }, [forgotPasswordFormVisibilityState]);\n const userInputData = JSON.stringify({\n email: `${username}`\n });\n const ForgotPasswordRequestOptions = {\n method: 'PUT',\n body: userInputData\n };\n\n const handlePasswordForgot = e => {\n e.preventDefault();\n toggleForgotPasswordFormVisible();\n setSubmitOkMessageModalState(true); // fetch(config.serviceAPI.ForgotPasswordURL, ForgotPasswordRequestOptions)\n // .then((res) => {\n // if (!res.ok) {\n // window.alert(\"Error: something went wrong\")\n // Promise.reject(\"\")\n // return\n // }\n // if (res.ok) {\n // toggleSubmitOkModalVisible()\n // }\n // })\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"password-forgot-prompt\",\n children: /*#__PURE__*/_jsxDEV(\"span\", {\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n onClick: toggleForgotPasswordFormVisible,\n children: \"Forgot password\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: `modal ${forgotPasswordFormVisibilityState ? \"active\" : \"inactive\"}`,\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: forgotPasswordFormRef,\n className: \"modal-content\",\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"recoverPasswordForm\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n children: \"Recover password\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"form\", {\n onSubmit: handlePasswordForgot,\n children: [/*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Email:\", /*#__PURE__*/_jsxDEV(\"input\", {\n id: \"email\",\n type: \"text\",\n value: username,\n onChange: handleUsernameChange\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: \"An email with a password recovery link will be sent if it is registered in our system\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 85,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"formSubmitButton\",\n type: \"submit\",\n children: [\"Submit\\xA0\\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"arrow-right\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 90,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 88,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: `modal ${forgotPasswordFormVisibilityState ? \"active\" : \"inactive\"}`,\n children: /*#__PURE__*/_jsxDEV(MessageModal, {\n removeModal: () => setSubmitOkMessageModalState(false),\n headerMessage: \"Email submitted!\",\n bodyMessage: \"An email with a password recovery link will be sent if it is registered in our system\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 97,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 96,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 5\n }, this);\n};\n\n_s(PasswordForgotModal, \"g4WkMIawwrBahYMYonVecg/0JA0=\");\n\n_c = PasswordForgotModal;\nexport default PasswordForgotModal;\n\nvar _c;\n\n$RefreshReg$(_c, \"PasswordForgotModal\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/login/passwordReset/PasswordForgotModal.jsx"],"names":["React","useState","useRef","useEffect","config","FontAwesomeIcon","MessageModal","PasswordForgotModal","forgotPasswordFormVisibilityState","setForgotPasswordFormVisibilityState","forgotPasswordFormRef","toggleForgotPasswordFormVisible","submitOkMessageModalState","setSubmitOkMessageModalState","username","setUsername","handleUsernameChange","e","target","value","pageClickEvent","current","contains","window","addEventListener","removeEventListener","userInputData","JSON","stringify","email","ForgotPasswordRequestOptions","method","body","handlePasswordForgot","preventDefault"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,QAAmD,OAAnD;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAO,2BAAP;AACA,OAAOC,YAAP,MAAyB,+CAAzB;;;AAEA,MAAMC,mBAAmB,GAAG,MAAM;AAAA;;AAChC,QAAM,CAACC,iCAAD,EAAoCC,oCAApC,IAA4ER,QAAQ,CAAC,KAAD,CAA1F;AACA,QAAMS,qBAAqB,GAAGR,MAAM,CAAC,IAAD,CAApC;;AACA,QAAMS,+BAA+B,GAAG,MAAMF,oCAAoC,CAAC,CAACD,iCAAF,CAAlF;;AAEA,QAAM,CAACI,yBAAD,EAA4BC,4BAA5B,IAA4DZ,QAAQ,CAAC,KAAD,CAA1E;AAEA,QAAM,CAACa,QAAD,EAAWC,WAAX,IAA0Bd,QAAQ,CAAC,EAAD,CAAxC;;AACA,QAAMe,oBAAoB,GAAIC,CAAD,IAAO;AAClCF,IAAAA,WAAW,CAACE,CAAC,CAACC,MAAF,CAASC,KAAV,CAAX;AACD,GAFD;;AAIAhB,EAAAA,SAAS,CAAC,MAAM;AACd,UAAMiB,cAAc,GAAIH,CAAD,IAAO;AAC5B,UAAIP,qBAAqB,CAACW,OAAtB,KAAkC,IAAlC,IAA0C,CAACX,qBAAqB,CAACW,OAAtB,CAA8BC,QAA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BADF,eAEE;AAAM,YAAA,QAAQ,EAAEuB,oBAAhB;AAAA,oCACE;AAAA,gDAEE;AACE,gBAAA,EAAE,EAAC,OADL;AACa,gBAAA,IAAI,EAAC,MADlB;AAEE,gBAAA,KAAK,EAAEnB,QAFT;AAGE,gBAAA,QAAQ,EAAEE;AAHZ;AAAA;AAAA;AAAA;AAAA,sBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,oBADF,eAQE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBARF,eAWE;AAAQ,cAAA,SAAS,EAAC,kBAAlB;AAAqC,cAAA,IAAI,EAAC,QAA1C;AAAA,wDAEE,QAAC,eAAD;AAAiB,gBAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,sBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,oBAXF;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YARF,eA+BE;AAAK,MAAA,SAAS,EAAG,SAAQR,iCAAiC,GAAG,QAAH,GAAc,UAAW,EAAnF;AAAA,6BACE,QAAC,YAAD;AAAc,QAAA,WAAW,EAAE,MAAMK,4BAA4B,CAAC,KAAD,CAA7D;AAAsE,QAAA,aAAa,EAAE,kBAArF;AAAyG,QAAA,WAAW,EAAE;AAAtH;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YA/BF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAsCD,CA/FD;;GAAMN,mB;;KAAAA,mB;AAiGN,eAAeA,mBAAf","sourcesContent":["import React, { useState, useRef, useEffect } from 'react'\r\nimport config from '../../../config'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport \"./PasswordForgotModal.css\"\r\nimport MessageModal from '../../../components/messageModal/MessageModal';\r\n\r\nconst PasswordForgotModal = () => {\r\n const [forgotPasswordFormVisibilityState, setForgotPasswordFormVisibilityState] = useState(false)\r\n const forgotPasswordFormRef = useRef(null)\r\n const toggleForgotPasswordFormVisible = () => setForgotPasswordFormVisibilityState(!forgotPasswordFormVisibilityState)\r\n\r\n const [submitOkMessageModalState, setSubmitOkMessageModalState] = useState(false);\r\n\r\n const [username, setUsername] = useState('');\r\n const handleUsernameChange = (e) => {\r\n setUsername(e.target.value);\r\n };\r\n\r\n useEffect(() => {\r\n const pageClickEvent = (e) => {\r\n if (forgotPasswordFormRef.current !== null && !forgotPasswordFormRef.current.contains(e.target)) {\r\n toggleForgotPasswordFormVisible()\r\n }\r\n };\r\n\r\n // If the item is active (ie open) then listen for clicks\r\n if (forgotPasswordFormVisibilityState) {\r\n window.addEventListener('click', pageClickEvent);\r\n }\r\n\r\n return () => {\r\n window.removeEventListener('click', pageClickEvent);\r\n }\r\n\r\n }, [forgotPasswordFormVisibilityState]);\r\n\r\n const userInputData = JSON.stringify({\r\n email: `${username}`,\r\n })\r\n\r\n const ForgotPasswordRequestOptions = {\r\n method: 'PUT',\r\n body: userInputData\r\n }\r\n\r\n const handlePasswordForgot = (e) => {\r\n e.preventDefault();\r\n\r\n toggleForgotPasswordFormVisible()\r\n setSubmitOkMessageModalState(true)\r\n // fetch(config.serviceAPI.ForgotPasswordURL, ForgotPasswordRequestOptions)\r\n // .then((res) => {\r\n // if (!res.ok) {\r\n // window.alert(\"Error: something went wrong\")\r\n // Promise.reject(\"\")\r\n // return\r\n // }\r\n // if (res.ok) {\r\n // toggleSubmitOkModalVisible()\r\n // }\r\n // })\r\n }\r\n\r\n return (\r\n <div>\r\n <div className=\"password-forgot-prompt\">\r\n <span>\r\n <a onClick={toggleForgotPasswordFormVisible}>Forgot password</a>\r\n </span>\r\n </div>\r\n\r\n {/* Forgot password modal */}\r\n <div className={`modal ${forgotPasswordFormVisibilityState ? \"active\" : \"inactive\"}`}>\r\n <div ref={forgotPasswordFormRef} className=\"modal-content\">\r\n <div className=\"recoverPasswordForm\">\r\n <h2>Recover password</h2>\r\n <form onSubmit={handlePasswordForgot}>\r\n <label>\r\n Email:\r\n <input\r\n id=\"email\" type=\"text\"\r\n value={username}\r\n onChange={handleUsernameChange} />\r\n </label>\r\n <label>\r\n An email with a password recovery link will be sent if it is registered in our system\r\n </label>\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Submit&nbsp;&nbsp;\r\n <FontAwesomeIcon icon=\"arrow-right\"></FontAwesomeIcon>\r\n </button>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n <div className={`modal ${forgotPasswordFormVisibilityState ? \"active\" : \"inactive\"}`}>\r\n <MessageModal removeModal={() => setSubmitOkMessageModalState(false)} headerMessage={\"Email submitted!\"} bodyMessage={\"An email with a password recovery link will be sent if it is registered in our system\"} />\r\n </div>\r\n </div>\r\n\r\n )\r\n}\r\n\r\nexport default PasswordForgotModal\r\n"]},"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\";\nimport React 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 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 Mathias!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 11,\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: 14,\n columnNumber: 13\n }, this), \"\\xA0\\xA0Report issues\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 13,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 12,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 10,\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: 20,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }, this);\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":["React","NavLink","FontAwesomeIcon","Updates","Home"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAO,YAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAOC,OAAP,MAAoB,mBAApB;;;AAEA,MAAMC,IAAI,GAAG,MAAM;AACjB,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,CAjBD;;KAAMA,I;AAmBN,eAAeA,IAAf","sourcesContent":["import React 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 return (\r\n <div className=\"homepage-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"welcome-text\">Welcome Mathias!</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":"import baseSet from './_baseSet.js';\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nexport default set;","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/lodash-es/set.js"],"names":["baseSet","set","object","path","value"],"mappings":"AAAA,OAAOA,OAAP,MAAoB,eAApB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,GAAT,CAAaC,MAAb,EAAqBC,IAArB,EAA2BC,KAA3B,EAAkC;AAChC,SAAOF,MAAM,IAAI,IAAV,GAAiBA,MAAjB,GAA0BF,OAAO,CAACE,MAAD,EAASC,IAAT,EAAeC,KAAf,CAAxC;AACD;;AAED,eAAeH,GAAf","sourcesContent":["import baseSet from './_baseSet.js';\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nexport default set;\n"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/@popperjs/core/lib/modifiers/arrow.js"],"names":["getBasePlacement","getLayoutRect","contains","getOffsetParent","getMainAxisFromPlacement","within","mergePaddingObject","expandToHashMap","left","right","basePlacements","top","bottom","isHTMLElement","toPaddingObject","padding","state","Object","assign","rects","placement","arrow","_ref","_state$modifiersData$","name","options","arrowElement","elements","popperOffsets","modifiersData","basePlacement","axis","isVertical","indexOf","len","paddingObject","arrowRect","minProp","maxProp","endDiff","reference","popper","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","min","max","center","offset","axisProp","centerOffset","effect","_ref2","_options$element","element","querySelector","process","env","NODE_ENV","console","error","join","enabled","phase","fn","requires","requiresIfExists"],"mappings":"AAAA,OAAOA,gBAAP,MAA6B,8BAA7B;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,QAAP,MAAqB,0BAArB;AACA,OAAOC,eAAP,MAA4B,iCAA5B;AACA,OAAOC,wBAAP,MAAqC,sCAArC;AACA,OAAOC,MAAP,MAAmB,oBAAnB;AACA,OAAOC,kBAAP,MAA+B,gCAA/B;AACA,OAAOC,eAAP,MAA4B,6BAA5B;AACA,SAASC,IAAT,EAAeC,KAAf,EAAsBC,cAAtB,EAAsCC,GAAtC,EAA2CC,MAA3C,QAAyD,aAAzD;AACA,SAASC,aAAT,QAA8B,4BAA9B,C,CAA4D;;AAE5D,IAAIC,eAAe,GAAG,SAASA,eAAT,CAAyBC,OAAzB,EAAkCC,KAAlC,EAAyC;AAC7DD,EAAAA,OAAO,GAAG,OAAOA,OAAP,KAAmB,UAAnB,GAAgCA,OAAO,CAACE,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBF,KAAK,CAACG,KAAxB,EAA+B;AAC/EC,IAAAA,SAAS,EAAEJ,KAAK,CAACI;AAD8D,GAA/B,CAAD,CAAvC,GAEJL,OAFN;AAGA,SAAOT,kBAAkB,CAAC,OAAOS,OAAP,KAAmB,QAAnB,GAA8BA,OAA9B,GAAwCR,eAAe,CAACQ,OAAD,EAAUL,cAAV,CAAxD,CAAzB;AACD,CALD;;AAOA,SAASW,KAAT,CAAeC,IAAf,EAAqB;AACnB,MAAIC,qBAAJ;;AAEA,MAAIP,KAAK,GAAGM,IAAI,CAACN,KAAjB;AAAA,MACIQ,IAAI,GAAGF,IAAI,CAACE,IADhB;AAAA,MAEIC,OAAO,GAAGH,IAAI,CAACG,OAFnB;AAGA,MAAIC,YAAY,GAAGV,KAAK,CAACW,QAAN,CAAeN,KAAlC;AACA,MAAIO,aAAa,GAAGZ,KAAK,CAACa,aAAN,CAAoBD,aAAxC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YC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC,QAAI,CAAChD,aAAa,CAACa,YAAD,CAAlB,EAAkC;AAChCoC,MAAAA,OAAO,CAACC,KAAR,CAAc,CAAC,qEAAD,EAAwE,qEAAxE,EAA+I,YAA/I,EAA6JC,IAA7J,CAAkK,GAAlK,CAAd;AACD;AACF;;AAED,MAAI,CAAC9D,QAAQ,CAACc,KAAK,CAACW,QAAN,CAAec,MAAhB,EAAwBf,YAAxB,CAAb,EAAoD;AAClD,QAAIiC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzCC,MAAAA,OAAO,CAACC,KAAR,CAAc,CAAC,qEAAD,EAAwE,UAAxE,EAAoFC,IAApF,CAAyF,GAAzF,CAAd;AACD;;AAED;AACD;;AAEDhD,EAAAA,KAAK,CAACW,QAAN,CAAeN,KAAf,GAAuBK,YAAvB;AACD,C,CAAC;;;AAGF,eAAe;AACbF,EAAAA,IAAI,EAAE,OADO;AAEbyC,EAAAA,OAAO,EAAE,IAFI;AAGbC,EAAAA,KAAK,EAAE,MAHM;AAIbC,EAAAA,EAAE,EAAE9C,KAJS;AAKbiC,EAAAA,MAAM,EAAEA,MALK;AAMbc,EAAAA,QAAQ,EAAE,CAAC,eAAD,CANG;AAObC,EAAAA,gBAAgB,EAAE,CAAC,iBAAD;AAPL,CAAf","sourcesContent":["import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"export default function getVariation(placement) {\n return placement.split('-')[1];\n}","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/@popperjs/core/lib/utils/getVariation.js"],"names":["getVariation","placement","split"],"mappings":"AAAA,eAAe,SAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC9C,SAAOA,SAAS,CAACC,KAAV,CAAgB,GAAhB,EAAqB,CAArB,CAAP;AACD","sourcesContent":["export default function getVariation(placement) {\n return placement.split('-')[1];\n}"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\navbar\\\\dropdownMenu\\\\NavbarDropdownMenu.jsx\",\n _s = $RefreshSig$();\n\nimport React, { useRef, useState, useEffect } from 'react';\nimport { NavLink } from \"react-router-dom\";\nimport { useOktaAuth } from '@okta/okta-react';\nimport \"./NavbarDropdownMenu.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst DropdownMenu = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const dropdownRef = useRef(null);\n const [isActive, setIsActive] = useState(false);\n\n const onClick = () => setIsActive(!isActive);\n\n useEffect(() => {\n const pageClickEvent = e => {\n if (dropdownRef.current !== null && !dropdownRef.current.contains(e.target)) {\n setIsActive(!isActive);\n }\n }; // If the item is active (ie open) then listen for clicks\n\n\n if (isActive) {\n window.addEventListener('click', pageClickEvent);\n }\n\n return () => {\n window.removeEventListener('click', pageClickEvent);\n };\n }, [isActive]);\n useEffect(() => {\n if (!authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n oktaAuth.getUser().then(info => {\n setUserInfo(info);\n });\n }\n }, [authState, oktaAuth]); // Update if authState changes\n\n const logout = () => {\n oktaAuth.signOut();\n };\n\n return /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"navbar-user-dropdown-container\",\n children: [/*#__PURE__*/_jsxDEV(\"button\", {\n className: `user-dropdown-menu-toggle-button ${isActive ? 'active' : 'inactive'}`,\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n className: \"user-icon\",\n icon: \"user-circle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n className: \"down-arrow\",\n icon: \"angle-down\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n ref: dropdownRef,\n className: `user-dropDown-menu-content ${isActive ? 'active' : 'inactive'}`,\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"menu-item\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"item-text-top\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"upper-row\",\n children: /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/account\",\n className: \"menu-item-link\",\n children: \"Account\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 19\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"bottom-row\",\n children: /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/account\",\n className: \"menu-item-link-bottom\",\n children: userInfo ? userInfo.email : \"...\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 19\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n children: /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n className: \"item-icon\",\n icon: \"user-circle\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 15\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"menu-item\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"item-text-top\",\n children: /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/account\",\n className: \"menu-item-link\",\n children: \"Messages\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 83,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 82,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n children: /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n className: \"item-icon\",\n icon: \"envelope\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 88,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 87,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 81,\n columnNumber: 15\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 102,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 5\n }, this);\n};\n\n_s(DropdownMenu, \"fSJPYre4v1rGcIZdck7wMJJU1dU=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = DropdownMenu;\nexport default DropdownMenu;\n\nvar _c;\n\n$RefreshReg$(_c, \"DropdownMenu\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/navbar/dropdownMenu/NavbarDropdownMenu.jsx"],"names":["React","useRef","useState","useEffect","NavLink","useOktaAuth","FontAwesomeIcon","DropdownMenu","authState","oktaAuth","userInfo","setUserInfo","dropdownRef","isActive","setIsActive","onClick","pageClickEvent","e","current","contains","target","window","addEventList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Link } from \"react-router-dom\";\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport \"./NavbarDropdownMenu.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\n\r\nconst DropdownMenu = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [userInfo, setUserInfo] = useState(null);\r\n\r\n const dropdownRef = useRef(null);\r\n const [isActive, setIsActive] = useState(false);\r\n const onClick = () => setIsActive(!isActive);\r\n\r\n useEffect(() => {\r\n const pageClickEvent = (e) => {\r\n if (dropdownRef.current !== null && !dropdownRef.current.contains(e.target)) {\r\n setIsActive(!isActive);\r\n }\r\n };\r\n\r\n // If the item is active (ie open) then listen for clicks\r\n if (isActive) {\r\n window.addEventListener('click', pageClickEvent);\r\n }\r\n\r\n return () => {\r\n window.removeEventListener('click', pageClickEvent);\r\n }\r\n\r\n }, [isActive]);\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.getUser().then(info => {\r\n setUserInfo(info);\r\n });\r\n }\r\n }, [authState, oktaAuth]); // Update if authState changes\r\n\r\n const logout = () => {\r\n oktaAuth.signOut()\r\n }\r\n\r\n return (\r\n <li>\r\n <div className=\"navbar-user-dropdown-container\">\r\n <button className={`user-dropdown-menu-toggle-button ${isActive ? 'active' : 'inactive'}`} onClick={onClick} >\r\n <FontAwesomeIcon className=\"user-icon\" icon=\"user-circle\"></FontAwesomeIcon>\r\n <FontAwesomeIcon className=\"down-arrow\" icon=\"angle-down\"></FontAwesomeIcon>\r\n </button>\r\n {/* show submenu?*/}\r\n <div ref={dropdownRef} className={`user-dropDown-menu-content ${isActive ? 'active' : 'inactive'}`}>\r\n <ul>\r\n\r\n <li>\r\n <div className=\"menu-item\">\r\n <div className=\"item-text-top\">\r\n <div className=\"upper-row\">\r\n <NavLink to=\"/account\" className=\"menu-item-link\">\r\n Account\r\n </NavLink>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <NavLink to=\"/account\" className=\"menu-item-link-bottom\">\r\n {userInfo ? userInfo.email : \"...\"}\r\n </NavLink>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"item-icon\" icon=\"user-circle\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </li>\r\n\r\n <li>\r\n <div className=\"menu-item\">\r\n <div className=\"item-text-top\">\r\n <NavLink to=\"/account\" className=\"menu-item-link\">\r\n Messages\r\n </NavLink>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"item-icon\" icon=\"envelope\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n {/* <NavLink to=\"/messages\">\r\n \r\n </NavLink> */}\r\n </li>\r\n\r\n {/* <li>\r\n <a href=\"./\">\r\n <FontAwesomeIcon icon=\"sliders-h\"></FontAwesomeIcon>&nbsp;&nbsp;Preferences\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"item-icon-icon\"></FontAwesomeIcon>\r\n </a>\r\n </li> */}\r\n <li>\r\n {/* <a onClick={logout}>\r\n <FontAwesomeIcon icon=\"sign-out-alt\"></FontAwesomeIcon>&nbsp;&nbsp;Log out\r\n </a> */}\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </li >\r\n )\r\n}\r\n\r\nexport default DropdownMenu"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"export var TRANSITION_STATUS_INITIAL = 'INITIAL';\nexport var TRANSITION_STATUS_ENTERED = 'ENTERED';\nexport var TRANSITION_STATUS_ENTERING = 'ENTERING';\nexport var TRANSITION_STATUS_EXITED = 'EXITED';\nexport var TRANSITION_STATUS_EXITING = 'EXITING';\nexport var TRANSITION_STATUS_UNMOUNTED = 'UNMOUNTED';\n/**\n * @param {Object} [options]\n * @param {String} [options.status]\n * @param {Boolean} [options.mountOnShow]\n * @param {Boolean} [options.transitionOnMount]\n * @param {Boolean} [options.visible]\n * @param {Boolean} [options.unmountOnHide]\n */\n\nexport function computeStatuses(options) {\n var mountOnShow = options.mountOnShow,\n status = options.status,\n transitionOnMount = options.transitionOnMount,\n visible = options.visible,\n unmountOnHide = options.unmountOnHide;\n\n if (visible) {\n if (status === TRANSITION_STATUS_INITIAL) {\n if (transitionOnMount) {\n return {\n animating: true,\n status: TRANSITION_STATUS_ENTERING,\n nextStatus: TRANSITION_STATUS_ENTERED\n };\n }\n\n return {\n animating: false,\n status: TRANSITION_STATUS_ENTERED,\n nextStatus: undefined\n };\n }\n\n if (status === TRANSITION_STATUS_UNMOUNTED) {\n return {\n animating: true,\n status: TRANSITION_STATUS_ENTERING,\n nextStatus: TRANSITION_STATUS_ENTERED\n };\n }\n\n if (status === TRANSITION_STATUS_EXITED || status === TRANSITION_STATUS_EXITING) {\n return {\n animating: true,\n status: TRANSITION_STATUS_ENTERING,\n nextStatus: TRANSITION_STATUS_ENTERED\n };\n }\n\n if (status === TRANSITION_STATUS_ENTERING) {\n return {};\n }\n /* istanbul ignore else */\n\n\n if (status === TRANSITION_STATUS_ENTERED) {\n return {\n animating: false,\n status: TRANSITION_STATUS_ENTERED,\n nextStatus: undefined\n };\n }\n }\n\n if (status === TRANSITION_STATUS_INITIAL) {\n if (mountOnShow || unmountOnHide) {\n return {\n animating: false,\n status: TRANSITION_STATUS_UNMOUNTED,\n nextStatus: undefined\n };\n }\n\n return {\n animating: false,\n status: TRANSITION_STATUS_EXITED,\n nextStatus: undefined\n };\n }\n\n if (status === TRANSITION_STATUS_ENTERED || status === TRANSITION_STATUS_ENTERING) {\n return {\n animating: true,\n status: TRANSITION_STATUS_EXITING,\n nextStatus: unmountOnHide ? TRANSITION_STATUS_UNMOUNTED : TRANSITION_STATUS_EXITED\n };\n }\n\n if (status === TRANSITION_STATUS_EXITING) {\n return {};\n }\n\n if (status === TRANSITION_STATUS_EXITED) {\n return {\n animating: false,\n status: TRANSITION_STATUS_EXITED,\n nextStatus: undefined\n };\n }\n /* istanbul ignore else */\n\n\n if (status === TRANSITION_STATUS_UNMOUNTED) {\n return {\n animating: false,\n status: TRANSITION_STATUS_UNMOUNTED,\n nextStatus: undefined\n };\n }\n /* istanbul ignore next */\n\n\n throw new Error(\"Transition:computeStatuses(): an unexpected status transition: { visible: \" + visible + \", status: \" + status + \" }\");\n}","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/semantic-ui-react/dist/es/modules/Transition/utils/computeStatuses.js"],"names":["TRANSITION_STATUS_INITIAL","TRANSITION_STATUS_ENTERED","TRANSITION_STATUS_ENTERING","TRANSITION_STATUS_EXITED","TRANSITION_STATUS_EXITING","TRANSITION_STATUS_UNMOUNTED","computeStatuses","options","mountOnShow","status","transitionOnMount","visible","unmountOnHide","animating","nextStatus","undefined","Error"],"mappings":"AAAA,OAAO,IAAIA,yBAAyB,GAAG,SAAhC;AACP,OAAO,IAAIC,yBAAyB,GAAG,SAAhC;AACP,OAAO,IAAIC,0BAA0B,GAAG,UAAjC;AACP,OAAO,IAAIC,wBAAwB,GAAG,QAA/B;AACP,OAAO,IAAIC,yBAAyB,GAAG,SAAhC;AACP,OAAO,IAAIC,2BAA2B,GAAG,WAAlC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASC,eAAT,CAAyBC,OAAzB,EAAkC;AACvC,MAAIC,WAAW,GAAGD,OAAO,CAACC,WAA1B;AAAA,MACIC,MAAM,GAAGF,OAAO,CAACE,MADrB;AAAA,MAEIC,iBAAiB,GAAGH,OAAO,CAACG,iBAFhC;AAAA,MAGIC,OAAO,GAAGJ,OAAO,CAACI,OAHtB;AAAA,MAIIC,aAAa,GAAGL,OAAO,CAACK,aAJ5B;;AAMA,MAAID,OAAJ,EAAa;AACX,QAAIF,MAAM,KAAKT,yBAAf,EAA0C;AACxC,UAAIU,iBAAJ,EAAuB;AACrB,eAAO;AACLG,UAAAA,SAAS,EAAE,IADN;AAELJ,UAAAA,MAAM,EAAEP,0BAFH;AAGLY,UAAAA,UAAU,EAAEb;AA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UAAU,EAAEF,aAAa,GAAGP,2BAAH,GAAiCF;AAHrD,KAAP;AAKD;;AAED,MAAIM,MAAM,KAAKL,yBAAf,EAA0C;AACxC,WAAO,EAAP;AACD;;AAED,MAAIK,MAAM,KAAKN,wBAAf,EAAyC;AACvC,WAAO;AACLU,MAAAA,SAAS,EAAE,KADN;AAELJ,MAAAA,MAAM,EAAEN,wBAFH;AAGLW,MAAAA,UAAU,EAAEC;AAHP,KAAP;AAKD;AACD;;;AAGA,MAAIN,MAAM,KAAKJ,2BAAf,EAA4C;AAC1C,WAAO;AACLQ,MAAAA,SAAS,EAAE,KADN;AAELJ,MAAAA,MAAM,EAAEJ,2BAFH;AAGLS,MAAAA,UAAU,EAAEC;AAHP,KAAP;AAKD;AACD;;;AAGA,QAAM,IAAIC,KAAJ,CAAU,+EAA+EL,OAA/E,GAAyF,YAAzF,GAAwGF,MAAxG,GAAiH,IAA3H,CAAN;AACD","sourcesContent":["export var TRANSITION_STATUS_INITIAL = 'INITIAL';\nexport var TRANSITION_STATUS_ENTERED = 'ENTERED';\nexport var TRANSITION_STATUS_ENTERING = 'ENTERING';\nexport var TRANSITION_STATUS_EXITED = 'EXITED';\nexport var TRANSITION_STATUS_EXITING = 'EXITING';\nexport var TRANSITION_STATUS_UNMOUNTED = 'UNMOUNTED';\n/**\n * @param {Object} [options]\n * @param {String} [options.status]\n * @param {Boolean} [options.mountOnShow]\n * @param {Boolean} [options.transitionOnMount]\n * @param {Boolean} [options.visible]\n * @param {Boolean} [options.unmountOnHide]\n */\n\nexport function computeStatuses(options) {\n var mountOnShow = options.mountOnShow,\n status = options.status,\n transitionOnMount = options.transitionOnMount,\n visible = options.visible,\n unmountOnHide = options.unmountOnHide;\n\n if (visible) {\n if (status === TRANSITION_STATUS_INITIAL) {\n if (transitionOnMount) {\n return {\n animating: true,\n status: TRANSITION_STATUS_ENTERING,\n nextStatus: TRANSITION_STATUS_ENTERED\n };\n }\n\n return {\n animating: false,\n status: TRANSITION_STATUS_ENTERED,\n nextStatus: undefined\n };\n }\n\n if (status === TRANSITION_STATUS_UNMOUNTED) {\n return {\n animating: true,\n status: TRANSITION_STATUS_ENTERING,\n nextStatus: TRANSITION_STATUS_ENTERED\n };\n }\n\n if (status === TRANSITION_STATUS_EXITED || status === TRANSITION_STATUS_EXITING) {\n return {\n animating: true,\n status: TRANSITION_STATUS_ENTERING,\n nextStatus: TRANSITION_STATUS_ENTERED\n };\n }\n\n if (status === TRANSITION_STATUS_ENTERING) {\n return {};\n }\n /* istanbul ignore else */\n\n\n if (status === TRANSITION_STATUS_ENTERED) {\n return {\n animating: false,\n status: TRANSITION_STATUS_ENTERED,\n nextStatus: undefined\n };\n }\n }\n\n if (status === TRANSITION_STATUS_INITIAL) {\n if (mountOnShow || unmountOnHide) {\n return {\n animating: false,\n status: TRANSITION_STATUS_UNMOUNTED,\n nextStatus: undefined\n };\n }\n\n return {\n animating: false,\n status: TRANSITION_STATUS_EXITED,\n nextStatus: undefined\n };\n }\n\n if (status === TRANSITION_STATUS_ENTERED || status === TRANSITION_STATUS_ENTERING) {\n return {\n animating: true,\n status: TRANSITION_STATUS_EXITING,\n nextStatus: unmountOnHide ? TRANSITION_STATUS_UNMOUNTED : TRANSITION_STATUS_EXITED\n };\n }\n\n if (status === TRANSITION_STATUS_EXITING) {\n return {};\n }\n\n if (status === TRANSITION_STATUS_EXITED) {\n return {\n animating: false,\n status: TRANSITION_STATUS_EXITED,\n nextStatus: undefined\n };\n }\n /* istanbul ignore else */\n\n\n if (status === TRANSITION_STATUS_UNMOUNTED) {\n return {\n animating: false,\n status: TRANSITION_STATUS_UNMOUNTED,\n nextStatus: undefined\n };\n }\n /* istanbul ignore next */\n\n\n throw new Error(\"Transition:computeStatuses(): an unexpected status transition: { visible: \" + visible + \", status: \" + status + \" }\");\n}"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"import isObject from './isObject.js';\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/lodash-es/_isStrictComparable.js"],"names":["isObject","isStrictComparable","value"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,eAArB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,kBAAT,CAA4BC,KAA5B,EAAmC;AACjC,SAAOA,KAAK,KAAKA,KAAV,IAAmB,CAACF,QAAQ,CAACE,KAAD,CAAnC;AACD;;AAED,eAAeD,kBAAf","sourcesContent":["import isObject from './isObject.js';\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;\n"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\login\\\\signUp\\\\SignUp.jsx\",\n _s = $RefreshSig$();\n\nimport React, { useState, useEffect } from 'react';\nimport { useOktaAuth } from '@okta/okta-react';\nimport \"./SignUp.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useInput } from '../../../util/useInput';\nimport { NavLink } from 'react-router-dom';\nimport config from \"../../../config\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst SignUp = () => {\n _s();\n\n const {\n authState,\n oktaAuth\n } = useOktaAuth();\n const [sessionToken, setSessionToken] = useState();\n const [firstName, setFirstName] = useState('');\n const [lastName, setLastName] = useState('');\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const userInputData = JSON.stringify({\n FirstName: `${firstName}`,\n LastName: `${lastName}`,\n Email: `${email}`,\n password: `${password}`\n });\n const requestOptions = {\n method: 'POST',\n body: userInputData\n };\n\n const handleSubmit = e => {\n e.preventDefault();\n fetch(config.serviceAPI.createNewUserURL, requestOptions).then(res => {\n if (!res.ok) {\n window.alert(\"Password requirements not met. Password must be at least 8 characters and have no parts of your username\");\n return Promise.reject();\n }\n\n return res.json();\n }).then(() => {\n oktaAuth.signInWithCredentials({\n email,\n password\n }).then(res => {\n const sessionToken = res.sessionToken;\n setSessionToken(sessionToken); // sessionToken is a one-use token, so make sure this is only called once\n\n oktaAuth.signInWithRedirect({\n sessionToken,\n originalUri: '/home'\n });\n }).catch(err => console.log('Found an error', err));\n });\n };\n\n const handleFirstNameChange = e => {\n setFirstName(e.target.value);\n };\n\n const handleLastNameChange = e => {\n setLastName(e.target.value);\n };\n\n const handleEmailChange = e => {\n setEmail(e.target.value);\n };\n\n const handlePasswordChange = e => {\n setPassword(e.target.value);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"pageContainer\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"spacer\",\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"text-container\",\n children: [/*#__PURE__*/_jsxDEV(\"h1\", {\n children: \"Get started with PipIt\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"h5\", {\n children: \"Track bugs and usabilty issues\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"signUpForm\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n children: \"Sign Up\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"form\", {\n onSubmit: handleSubmit,\n children: [/*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"First name:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Last Name:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 84,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 82,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Email:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 89,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 87,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Password:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"password\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 94,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 92,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n className: \"password-requirements\",\n children: \"Requirements: At least 8 characters, no parts of your username\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 97,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"formSubmitButton\",\n type: \"submit\",\n children: [\"Sign Up\\xA0\\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"user-plus\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 102,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 100,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"sign-up-prompt\",\n children: /*#__PURE__*/_jsxDEV(\"span\", {\n children: [\"Already have an account?\\xA0\", /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/signIn\",\n className: \"signInLink\",\n children: \"Sign in\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 107,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 106,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 105,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 5\n }, this);\n};\n\n_s(SignUp, \"8+72sMg80FVNhxNijJ4F05o0QkM=\", false, function () {\n return [useOktaAuth];\n});\n\n_c = SignUp;\nexport default SignUp;\n\nvar _c;\n\n$RefreshReg$(_c, \"SignUp\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/login/signUp/SignUp.jsx"],"names":["React","useState","useEffect","useOktaAuth","FontAwesomeIcon","useInput","NavLink","config","SignUp","authState","oktaAuth","sessionToken","setSessionToken","firstName","setFirstName","lastName","setLastName","email","setEmail","password","setPassword","userInputData","JSON","stringify","FirstName","LastName","Email","requestOptions","method","body","handleSubmit","e","preventDefault","fetch","serviceAPI","createNewUserURL","then","res","ok","window","alert","Promise","reject","json","signInWithCredentials","signInWithRedirect","originalUri","catch","err","console","log","handleFirstNameChange","target","value","handleLastNameChange","handleEmailChange","handlePasswordChange"],"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AAE,EAAC,SAAZ;AAAsB,YAAA,SAAS,EAAC,YAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cA9BF;AAAA;AAAA;AAAA;AAAA;AAAA,YAPF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAgDD,CA1GD;;GAAMtB,M;UAC4BL,W;;;KAD5BK,M;AA4GN,eAAeA,MAAf","sourcesContent":["import React, { useState, useEffect } from 'react';\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport \"./SignUp.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { useInput } from '../../../util/useInput'\r\nimport { NavLink } from 'react-router-dom';\r\nimport config from \"../../../config\"\r\n\r\nconst SignUp = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [sessionToken, setSessionToken] = useState();\r\n const [firstName, setFirstName] = useState('')\r\n const [lastName, setLastName] = useState('')\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('');\r\n\r\n const userInputData = JSON.stringify({\r\n FirstName: `${firstName}`,\r\n LastName: `${lastName}`,\r\n Email: `${email}`,\r\n password: `${password}`\r\n })\r\n\r\n const requestOptions = {\r\n method: 'POST',\r\n body: userInputData\r\n };\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n\r\n fetch(config.serviceAPI.createNewUserURL, requestOptions)\r\n .then((res) => {\r\n if (!res.ok) {\r\n window.alert(\"Password requirements not met. Password must be at least 8 characters and have no parts of your username\")\r\n return Promise.reject();\r\n }\r\n return res.json();\r\n }).then(() => {\r\n oktaAuth.signInWithCredentials({ email, password })\r\n .then(res => {\r\n const sessionToken = res.sessionToken;\r\n setSessionToken(sessionToken);\r\n // sessionToken is a one-use token, so make sure this is only called once\r\n oktaAuth.signInWithRedirect({ sessionToken, originalUri: '/home' });\r\n })\r\n .catch(err => console.log('Found an error', err));\r\n })\r\n }\r\n\r\n const handleFirstNameChange = (e) => {\r\n setFirstName(e.target.value)\r\n }\r\n\r\n const handleLastNameChange = (e) => {\r\n setLastName(e.target.value)\r\n }\r\n\r\n const handleEmailChange = (e) => {\r\n setEmail(e.target.value)\r\n }\r\n\r\n const handlePasswordChange = (e) => {\r\n setPassword(e.target.value)\r\n }\r\n\r\n return (\r\n <div className=\"pageContainer\">\r\n <div className=\"spacer\">\r\n <div className=\"text-container\">\r\n <h1>Get started with PipIt</h1>\r\n <h5>Track bugs and usabilty issues</h5>\r\n </div>\r\n </div>\r\n <div className=\"signUpForm\">\r\n <h2>Sign Up</h2>\r\n <form onSubmit={handleSubmit}>\r\n <label>\r\n First name:\r\n <input type=\"text\" />\r\n </label>\r\n <label>\r\n Last Name:\r\n <input\r\n type=\"text\" />\r\n </label>\r\n <label>\r\n Email:\r\n <input\r\n type=\"text\" />\r\n </label>\r\n <label>\r\n Password:\r\n <input\r\n type=\"password\" />\r\n </label>\r\n <label className=\"password-requirements\">\r\n Requirements: At least 8 characters, no parts of your username\r\n </label>\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Sign Up&nbsp;&nbsp;\r\n <FontAwesomeIcon icon=\"user-plus\"></FontAwesomeIcon>\r\n </button>\r\n </form>\r\n <div className=\"sign-up-prompt\">\r\n <span>Already have an account?&nbsp;\r\n <NavLink to=\"/signIn\" className=\"signInLink\">\r\n Sign in\r\n </NavLink>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default SignUp"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\login\\\\signUp\\\\SignUp.jsx\",\n _s = $RefreshSig$();\n\nimport React, { useState, useEffect } from 'react';\nimport \"./SignUp.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useInput } from '../../../util/useInput';\nimport { NavLink } from 'react-router-dom';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst SignUp = () => {\n _s();\n\n const {\n value: firstName,\n bind: bindFirstName,\n reset: resetFirstName\n } = useInput('');\n const {\n value: lastName,\n bind: bindLastName,\n reset: resetLastName\n } = useInput('');\n const {\n value: email,\n bind: bindEmail,\n reset: resetEmail\n } = useInput('');\n const {\n value: password,\n bind: bindPassword,\n reset: resetPassword\n } = useInput('');\n\n const handleSubmit = e => {\n e.preventDefault();\n alert(`Submitting user ${firstName} ${lastName} ${email} ${password}`);\n resetEmail();\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"pageContainer\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"spacer\",\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"text-container\",\n children: [/*#__PURE__*/_jsxDEV(\"h1\", {\n children: \"Get started with PipIt\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"h5\", {\n children: \"Track bugs and usabilty issues\"\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)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"signUpForm\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n children: \"Sign Up\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"form\", {\n onSubmit: handleSubmit,\n children: [/*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Fist name:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\",\n ...bindFirstName\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Last Name:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\",\n ...bindLastName\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Email:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\",\n ...bindEmail\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Password:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"password\",\n ...bindPassword\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"formSubmitButton\",\n type: \"submit\",\n children: [\"Sign Up\\xA0\\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"user-plus\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n to: \"/signIn\",\n className: \"sign-up-prompt\",\n children: /*#__PURE__*/_jsxDEV(\"span\", {\n children: [\"Already have an account?\\xA0\", /*#__PURE__*/_jsxDEV(NavLink, {\n className: \"signInLink\",\n children: \"Sign in\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 5\n }, this);\n};\n\n_s(SignUp, \"qBcPMosoFn1+k0tawoNFrCnYMDg=\", false, function () {\n return [useInput, useInput, useInput, useInput];\n});\n\n_c = SignUp;\nexport default SignUp;\n\nvar _c;\n\n$RefreshReg$(_c, \"SignUp\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/login/signUp/SignUp.jsx"],"names":["React","useState","useEffect","FontAwesomeIcon","useInput","NavLink","SignUp","value","firstName","bind","bindFirstName","reset","resetFirstName","lastName","bindLastName","resetLastName","email","bindEmail","resetEmail","password","bindPassword","resetPassword","handleSubmit","e","preventDefault","alert"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,QAAT,QAAyB,wBAAzB;AACA,SAASC,OAAT,QAAwB,kBAAxB;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM;AAAEC,IAAAA,KAAK,EAAEC,SAAT;AAAoBC,IAAAA,IAAI,EAAEC,aAA1B;AAAyCC,IAAAA,KAAK,EAAEC;AAAhD,MAAmER,QAAQ,CAAC,EAAD,CAAjF;AACA,QAAM;AAAEG,IAAAA,KAAK,EAAEM,QAAT;AAAmBJ,IAAAA,IAAI,EAAEK,YAAzB;AAAuCH,IAAAA,KAAK,EAAEI;AAA9C,MAAgEX,QAAQ,C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AAAA,4CAEE;AACE,YAAA,IAAI,EAAC,MADP;AAAA,eACkBG;AADlB;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,gBAVF,eAeE;AAAA,+CAEE;AACE,YAAA,IAAI,EAAC,UADP;AAAA,eACsBG;AADtB;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,gBAfF,eAoBE;AAAQ,UAAA,SAAS,EAAC,kBAAlB;AAAqC,UAAA,IAAI,EAAC,QAA1C;AAAA,qDAEE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,gBApBF;AAAA;AAAA;AAAA;AAAA;AAAA,cAFF,eA2BE;AAAK,QAAA,EAAE,EAAC,SAAR;AAAkB,QAAA,SAAS,EAAC,gBAA5B;AAAA,+BACE;AAAA,kEACE,QAAC,OAAD;AAAS,YAAA,SAAS,EAAC,YAAnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cA3BF;AAAA;AAAA;AAAA;AAAA;AAAA,YAPF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AA6CD,CAzDD;;GAAMd,M;UACqEF,Q,EACHA,Q,EACTA,Q,EACSA,Q;;;KAJlEE,M;AA2DN,eAAeA,MAAf","sourcesContent":["import React, { useState, useEffect } from 'react';\r\nimport \"./SignUp.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { useInput } from '../../../util/useInput'\r\nimport { NavLink } from 'react-router-dom';\r\n\r\nconst SignUp = () => {\r\n const { value: firstName, bind: bindFirstName, reset: resetFirstName } = useInput('')\r\n const { value: lastName, bind: bindLastName, reset: resetLastName } = useInput('')\r\n const { value: email, bind: bindEmail, reset: resetEmail } = useInput('')\r\n const { value: password, bind: bindPassword, reset: resetPassword } = useInput('')\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n alert(`Submitting user ${firstName} ${lastName} ${email} ${password}`);\r\n resetEmail();\r\n }\r\n\r\n return (\r\n <div className=\"pageContainer\">\r\n <div className=\"spacer\">\r\n <div className=\"text-container\">\r\n <h1>Get started with PipIt</h1>\r\n <h5>Track bugs and usabilty issues</h5>\r\n </div>\r\n </div>\r\n <div className=\"signUpForm\">\r\n <h2>Sign Up</h2>\r\n <form onSubmit={handleSubmit}>\r\n <label>\r\n Fist name:\r\n <input type=\"text\" {...bindFirstName} />\r\n </label>\r\n <label>\r\n Last Name:\r\n <input\r\n type=\"text\" {...bindLastName} />\r\n </label>\r\n <label>\r\n Email:\r\n <input\r\n type=\"text\" {...bindEmail} />\r\n </label>\r\n <label>\r\n Password:\r\n <input\r\n type=\"password\" {...bindPassword} />\r\n </label>\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Sign Up&nbsp;&nbsp;\r\n <FontAwesomeIcon icon=\"user-plus\"></FontAwesomeIcon>\r\n </button>\r\n </form>\r\n <div to=\"/signIn\" className=\"sign-up-prompt\">\r\n <span>Already have an account?&nbsp;\r\n <NavLink className=\"signInLink\">\r\n Sign in\r\n </NavLink>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default SignUp"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\login\\\\signUp\\\\SignUp.jsx\",\n _s = $RefreshSig$();\n\nimport React, { useState, useEffect } from 'react';\nimport \"./SignUp.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useInput } from '../../../util/useInput';\nimport { NavLink } from 'react-router-dom';\nimport config from \"../../../config\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst SignUp = () => {\n _s();\n\n const {\n value: firstName,\n bind: bindFirstName,\n reset: resetFirstName\n } = useInput('');\n const {\n value: lastName,\n bind: bindLastName,\n reset: resetLastName\n } = useInput('');\n const {\n value: email,\n bind: bindEmail,\n reset: resetEmail\n } = useInput('');\n const {\n value: password,\n bind: bindPassword,\n reset: resetPassword\n } = useInput('');\n\n const handleSubmit = e => {\n e.preventDefault(); //alert(`Submitting user ${firstName} ${lastName} ${email} ${password}`);\n\n fetch(config.serviceAPI.createNewUserURL, {\n method: 'POST',\n body: {\n FirstName: `${firstName}`,\n LastName: `${lastName}`,\n Email: `${email}`,\n password: `${password}`\n }\n }).then(response => {\n if (!response.ok) {\n return Promise.reject();\n }\n\n return response.json();\n });\n resetFirstName();\n resetLastName();\n resetEmail();\n resetPassword();\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"pageContainer\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"spacer\",\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"text-container\",\n children: [/*#__PURE__*/_jsxDEV(\"h1\", {\n children: \"Get started with PipIt\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"h5\", {\n children: \"Track bugs and usabilty issues\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\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), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"signUpForm\",\n children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n children: \"Sign Up\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"form\", {\n onSubmit: handleSubmit,\n children: [/*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Fist name:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\",\n ...bindFirstName\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Last Name:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\",\n ...bindLastName\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Email:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"text\",\n ...bindEmail\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n children: [\"Password:\", /*#__PURE__*/_jsxDEV(\"input\", {\n type: \"password\",\n ...bindPassword\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n className: \"formSubmitButton\",\n type: \"submit\",\n children: [\"Sign Up\\xA0\\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"user-plus\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"sign-up-prompt\",\n children: /*#__PURE__*/_jsxDEV(\"span\", {\n children: [\"Already have an account?\\xA0\", /*#__PURE__*/_jsxDEV(NavLink, {\n to: \"/signIn\",\n className: \"signInLink\",\n children: \"Sign in\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 5\n }, this);\n};\n\n_s(SignUp, \"qBcPMosoFn1+k0tawoNFrCnYMDg=\", false, function () {\n return [useInput, useInput, useInput, useInput];\n});\n\n_c = SignUp;\nexport default SignUp;\n\nvar _c;\n\n$RefreshReg$(_c, \"SignUp\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/login/signUp/SignUp.jsx"],"names":["React","useState","useEffect","FontAwesomeIcon","useInput","NavLink","config","SignUp","value","firstName","bind","bindFirstName","reset","resetFirstName","lastName","bindLastName","resetLastName","email","bindEmail","resetEmail","password","bindPassword","resetPassword","handleSubmit","e","preventDefault","fetch","serviceAPI","createNewUserURL","method","body","FirstName","LastName","Email","then","response","ok","Promise","reject","json"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,QAAT,QAAyB,wBAAzB;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,OAAOC,MAAP,MAAmB,iBAAnB;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM;AAAEC,IAAAA,KAAK,EAAEC,SAAT;AAAoBC,IAAAA,IAAI,EAAEC,aAA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f;AAAA,+BACE;AAAA,kEACE,QAAC,OAAD;AAAS,YAAA,EAAE,EAAC,SAAZ;AAAsB,YAAA,SAAS,EAAC,YAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBADF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cA3BF;AAAA;AAAA;AAAA;AAAA;AAAA,YAPF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AA6CD,CA3ED;;GAAMd,M;UACqEH,Q,EACHA,Q,EACTA,Q,EACSA,Q;;;KAJlEG,M;AA6EN,eAAeA,MAAf","sourcesContent":["import React, { useState, useEffect } from 'react';\r\nimport \"./SignUp.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { useInput } from '../../../util/useInput'\r\nimport { NavLink } from 'react-router-dom';\r\nimport config from \"../../../config\"\r\n\r\nconst SignUp = () => {\r\n const { value: firstName, bind: bindFirstName, reset: resetFirstName } = useInput('')\r\n const { value: lastName, bind: bindLastName, reset: resetLastName } = useInput('')\r\n const { value: email, bind: bindEmail, reset: resetEmail } = useInput('')\r\n const { value: password, bind: bindPassword, reset: resetPassword } = useInput('')\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n //alert(`Submitting user ${firstName} ${lastName} ${email} ${password}`);\r\n fetch(config.serviceAPI.createNewUserURL, {\r\n method: 'POST',\r\n body: {\r\n FirstName: `${firstName}`,\r\n LastName: `${lastName}`,\r\n Email: `${email}`,\r\n password: `${password}`\r\n },\r\n })\r\n .then((response) => {\r\n if (!response.ok) {\r\n return Promise.reject();\r\n }\r\n return response.json();\r\n })\r\n resetFirstName()\r\n resetLastName()\r\n resetEmail()\r\n resetPassword()\r\n }\r\n\r\n return (\r\n <div className=\"pageContainer\">\r\n <div className=\"spacer\">\r\n <div className=\"text-container\">\r\n <h1>Get started with PipIt</h1>\r\n <h5>Track bugs and usabilty issues</h5>\r\n </div>\r\n </div>\r\n <div className=\"signUpForm\">\r\n <h2>Sign Up</h2>\r\n <form onSubmit={handleSubmit}>\r\n <label>\r\n Fist name:\r\n <input type=\"text\" {...bindFirstName} />\r\n </label>\r\n <label>\r\n Last Name:\r\n <input\r\n type=\"text\" {...bindLastName} />\r\n </label>\r\n <label>\r\n Email:\r\n <input\r\n type=\"text\" {...bindEmail} />\r\n </label>\r\n <label>\r\n Password:\r\n <input\r\n type=\"password\" {...bindPassword} />\r\n </label>\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Sign Up&nbsp;&nbsp;\r\n <FontAwesomeIcon icon=\"user-plus\"></FontAwesomeIcon>\r\n </button>\r\n </form>\r\n <div className=\"sign-up-prompt\">\r\n <span>Already have an account?&nbsp;\r\n <NavLink to=\"/signIn\" className=\"signInLink\">\r\n Sign in\r\n </NavLink>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default SignUp"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
Markdown is supported
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