Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathias Engelbrecht Pilegård
Pipit
Commits
c9ac64c1
Commit
c9ac64c1
authored
Sep 01, 2021
by
Mathias Engelbrecht Pilegård
Browse files
refactoring
parent
473a37b4
Changes
26
Hide whitespace changes
Inline
Side-by-side
client/node_modules/.cache/.eslintcache
View file @
c9ac64c1
[{"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\index.js":"1","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\App.jsx":"2","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\config.js":"3","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useMessages.jsx":"4","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useInput.jsx":"5","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\Login.jsx":"6","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\Messages\\Messages.jsx":"7","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\ReportForm.jsx":"8","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\Home.jsx":"9","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\ProjectInfo.jsx":"10","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectOverview\\ProjectOverview.jsx":"11","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamInfo\\TeamInfo.jsx":"12","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamOverview\\TeamOverview.jsx":"13","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\assign\\Assign.jsx":"14","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\updates\\Updates.jsx":"15","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activitiesDisplay\\ActivitiesDisplay.jsx":"16","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activityChart\\ActivityChart.jsx":"17","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\Navbar.jsx":"18","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\logo\\Logo.jsx":"19","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\navLinks\\NavLinks.jsx":"20","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\searchbar\\Searchbar.jsx":"21","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\dropdownMenu\\NavbarDropdownMenu.jsx":"22","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\Account.jsx":"23","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\signUp\\SignUp.jsx":"24","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\passwordReset\\PasswordForgotModal.jsx":"25","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\messageModal\\MessageModal.jsx":"26","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\confirmRemoveAccountModal\\ConfirmRemoveAccountModal.jsx":"27","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\updateUserData\\UpdateUserDataModal.jsx":"28"},{"size":285,"mtime":1628516023915,"results":"29","hashOfConfig":"30"},{"size":2100,"mtime":1630074941213,"results":"31","hashOfConfig":"30"},{"size":610,"mtime":1630408468434,"results":"32","hashOfConfig":"30"},{"size":1489,"mtime":1629790769379,"results":"33","hashOfConfig":"30"},{"size":324,"mtime":1629371594261,"results":"34","hashOfConfig":"30"},{"size":2713,"mtime":1630395059503,"results":"35","hashOfConfig":"30"},{"size":626,"mtime":1628697746462,"results":"36","hashOfConfig":"30"},{"size":3967,"mtime":1628695632288,"results":"37","hashOfConfig":"30"},{"size":1279,"mtime":1630089091700,"results":"38","hashOfConfig":"30"},{"size":1068,"mtime":1628696051327,"results":"39","hashOfConfig":"30"},{"size":3660,"mtime":1629794572456,"results":"40","hashOfConfig":"30"},{"size":2374,"mtime":1628696187694,"results":"41","hashOfConfig":"30"},{"size":2694,"mtime":1628696113184,"results":"42","hashOfConfig":"30"},{"size":3264,"mtime":1628535700010,"results":"43","hashOfConfig":"30"},{"size":2334,"mtime":1630060568411,"results":"44","hashOfConfig":"30"},{"size":2096,"mtime":1628430812599,"results":"45","hashOfConfig":"30"},{"size":3570,"mtime":1628430832688,"results":"46","hashOfConfig":"30"},{"size":906,"mtime":1630073002522,"results":"47","hashOfConfig":"30"},{"size":548,"mtime":1628421916010,"results":"48","hashOfConfig":"30"},{"size":697,"mtime":1628430740299,"results":"49","hashOfConfig":"30"},{"size":470,"mtime":1628430752153,"results":"50","hashOfConfig":"30"},{"size":3533,"mtime":1630069281308,"results":"51","hashOfConfig":"30"},{"size":5373,"mtime":1630411181378,"results":"52","hashOfConfig":"30"},{"size":5569,"mtime":1630406765555,"results":"53","hashOfConfig":"30"},{"size":3623,"mtime":1630354196170,"results":"54","hashOfConfig":"30"},{"size":546,"mtime":1630352571382,"results":"55","hashOfConfig":"30"},{"size":2031,"mtime":1630406141127,"results":"56","hashOfConfig":"30"},{"size":3283,"mtime":1630409477894,"results":"57","hashOfConfig":"30"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},"iyhzrm",{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"65","messages":"66","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"67","usedDeprecatedRules":"60"},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"70"},{"filePath":"71","messages":"72","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"73","usedDeprecatedRules":"60"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"78","usedDeprecatedRules":"60"},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"83","messages":"84","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"85","usedDeprecatedRules":"60"},{"filePath":"86","messages":"87","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"88","usedDeprecatedRules":"60"},{"filePath":"89","messages":"90","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"91","usedDeprecatedRules":"60"},{"filePath":"92","messages":"93","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"94","usedDeprecatedRules":"60"},{"filePath":"95","messages":"96","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"97","usedDeprecatedRules":"60"},{"filePath":"98","messages":"99","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"100","usedDeprecatedRules":"60"},{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"103","messages":"104","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"105","usedDeprecatedRules":"60"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"108","usedDeprecatedRules":"60"},{"filePath":"109","messages":"110","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"111","messages":"112","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"113","messages":"114","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"115","usedDeprecatedRules":"60"},{"filePath":"116","messages":"117","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"118","messages":"119","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"120","messages":"121","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"122","usedDeprecatedRules":"60"},{"filePath":"123","messages":"124","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"125","usedDeprecatedRules":"60"},{"filePath":"126","messages":"127","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"128","messages":"129","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\index.js",[],["130","131"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\App.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\config.js",["132"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useMessages.jsx",["133"],"import { useState, useEffect } from 'react';\r\nimport { useOktaAuth } from '@okta/okta-react';\r\n\r\nimport config from \"../config\"\r\n\r\nconst useMessages = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [messages, setMessages] = useState(null);\r\n\r\n // fetch messages\r\n useEffect(() => {\r\n if (authState && authState.isAuthenticated) {\r\n const accessToken = oktaAuth.getAccessToken();\r\n fetch(config.serviceAPI.messagesURL, {\r\n method: 'GET',\r\n headers: {\r\n Authorization: `Bearer ${accessToken}`,\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 .then((data) => {\r\n let index = 0;\r\n const formattedMessages = data.messages.map((message) => {\r\n const date = new Date(message.date);\r\n const day = date.toLocaleDateString();\r\n const time = date.toLocaleTimeString();\r\n index += 1;\r\n return {\r\n date: `${day} ${time}`,\r\n sender: message.sender,\r\n text: message.text,\r\n id: `message-${index}`,\r\n };\r\n });\r\n setMessages(formattedMessages);\r\n })\r\n .catch((err) => {\r\n /* eslint-disable no-console */\r\n console.error(err);\r\n });\r\n }\r\n }, [authState]);\r\n\r\n return messages\r\n}\r\n\r\nexport default useMessages","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useInput.jsx",[],["134","135"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\Login.jsx",["136","137","138","139","140","141"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport { Redirect } from 'react-router-dom'\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport \"./Login.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { NavLink } from 'react-router-dom';\r\nimport signUp from './signUp/SignUp';\r\nimport config from '../../config';\r\nimport SignUp from './signUp/SignUp';\r\nimport PasswordForgotModal from './passwordReset/PasswordForgotModal';\r\n\r\nconst Login = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [sessionToken, setSessionToken] = useState()\r\n\r\n const [username, setUsername] = useState('');\r\n const [password, setPassword] = useState('');\r\n\r\n const handleUsernameChange = (e) => {\r\n setUsername(e.target.value);\r\n };\r\n\r\n const handlePasswordChange = (e) => {\r\n setPassword(e.target.value)\r\n }\r\n\r\n const userInputData = JSON.stringify({\r\n email: `${username}`,\r\n password: `${password}`\r\n })\r\n\r\n const loginRequestOptions = {\r\n method: 'POST',\r\n body: userInputData\r\n };\r\n\r\n const handleSignInFormSubmit = (e) => {\r\n e.preventDefault();\r\n\r\n oktaAuth.signInWithCredentials({ username, 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 if (sessionToken) {\r\n // Hide form while sessionToken is converted into id/access tokens\r\n return null;\r\n }\r\n\r\n if (!authState || !authState.isAuthenticated) {\r\n return (\r\n <div className=\"pageContainer\">\r\n <SignUp />\r\n\r\n <div className=\"signInForm\">\r\n <h2>Sign in to PipIt</h2>\r\n <form onSubmit={handleSignInFormSubmit}>\r\n <label>\r\n Email:\r\n <input\r\n id=\"username\" type=\"text\"\r\n value={username}\r\n onChange={handleUsernameChange} />\r\n </label>\r\n <label>\r\n Password:\r\n <input\r\n id=\"password\" type=\"password\"\r\n value={password}\r\n onChange={handlePasswordChange} />\r\n </label>\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Sign in \r\n <FontAwesomeIcon icon=\"sign-in-alt\"></FontAwesomeIcon>\r\n </button>\r\n </form>\r\n <PasswordForgotModal />\r\n </div>\r\n </div>\r\n )\r\n } else {\r\n return <Redirect to=\"/home\" />\r\n }\r\n}\r\n\r\nexport default Login","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\Messages\\Messages.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\ReportForm.jsx",["142"],"import React, { useState } from 'react'\r\nimport \"./ReportForm.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Assign from './assign/Assign'\r\n\r\nconst ReportForm = () => {\r\n return (\r\n <div className=\"page-content-container\">\r\n <h2 className=\"reportissuePageText\">Report an issue</h2>\r\n <form action=\"/reportFormData\">\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueType\">Type of issue</label>\r\n </div>\r\n <div className=\"col-75\">\r\n <select id=\"fissueType\" className=\"issueType\">\r\n <option value=\"bug\">Bug</option>\r\n <option value=\"usabilityissue\">Usability error</option>\r\n <option value=\"other\">Other</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-25\">\r\n <label for=\"fissueLocation\">Where did you encounter the issue?</label>\r\n </div>\r\n <div class=\"col-75\">\r\n <input type=\"text\" id=\"fissueLocation\" className=\"issueLocation\" ></input>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-25\">\r\n <label for=\"fissueDescription\">Describe the issue</label>\r\n </div>\r\n <div class=\"col-75\">\r\n <textarea id=\"fissueDescription\" className=\"issueDescription\"></textarea>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-25\">\r\n <label for=\"fissueStepsToTeproduce\">What steps did you take before the issue happened?</label>\r\n </div>\r\n <div class=\"col-75\">\r\n <textarea id=\"fissueStepsToTeproduce\" className=\"issueStepsToReproduce\"\r\n placeholder=\"List the steps that occurred before the issue happened:\r\n1.\r\n2.\r\n3.\r\nExpected Result:\r\nActual Result:\">\r\n </textarea>\r\n </div>\r\n </div>\r\n\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueSeverity\">Severity level</label>\r\n </div>\r\n <div className=\"col-75\">\r\n <select id=\"fissueSeverity\" className=\"issueSeverity\">\r\n <option value=\"cosmetic\">Cosmetic - should be corrected when time permits</option>\r\n <option value=\"serious\">Serious - should be corrected in the next release</option>\r\n <option value=\"critical\">Critical - should be corrected as soon as possible</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueTimeToCorrect\">Time to Correct</label>\r\n </div>\r\n <div className=\"col-75\">\r\n <select id=\"fissueSeverity\" className=\"issueTimeToCorrect\">\r\n <option value=\"lessThanTwoHours\">Less than 2 minutes</option>\r\n <option value=\"lessThanOneToTwoDays\">Less than 1 or 2 days</option>\r\n <option value=\"lessThanOneToTwoWeeks\">Less than 1 or 2 weeks</option>\r\n <option value=\"atLeastTwoWeeks\">More than 2 weeks</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueAssignToProject\">Assign to</label>\r\n </div>\r\n <div className=\"col-75\">\r\n {/*\r\n <select id=\"fissueAssignToProject\" className=\"issueAssignToProject\">\r\n <option value=\"lessThanTwoHours\">Henriks meme machine - ReactApp</option>\r\n </select>\r\n */}\r\n <Assign />\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row\">\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Submit \r\n <FontAwesomeIcon icon=\"arrow-right\"></FontAwesomeIcon>\r\n </button>\r\n </div>\r\n </form>\r\n </div >\r\n )\r\n}\r\n\r\nexport default ReportForm","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\Home.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\ProjectInfo.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectOverview\\ProjectOverview.jsx",["143","144"],"import React, { useState } from 'react'\r\nimport { NavLink } from \"react-router-dom\";\r\nimport \"./ProjectOverview.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst ProjectOverview = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }, { name: \"Teskeholdet\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [sharedProjectsButtonState, setSharedProjectsButtonState] = useState(true);\r\n const [personalProjectsButtonState, setPersonalProjectsButtonState] = useState(false);\r\n\r\n const SharedProjectsButtonActive = () => {\r\n setSharedProjectsButtonState(true);\r\n setPersonalProjectsButtonState(false);\r\n };\r\n\r\n const PersonalProjectsButtonActive = () => {\r\n setSharedProjectsButtonState(false);\r\n setPersonalProjectsButtonState(true);\r\n };\r\n\r\n const ProjectsDisplay = (projects) => {\r\n return (\r\n <div className=\"projectlist\">\r\n <ul>\r\n {projects.map((elements, index) => (\r\n <li>\r\n <div className=\"project-entry\">\r\n <div className=\"project-team-name\">\r\n <NavLink to={`/${projects[index].id}`}>{projects[index].id} \r\n <FontAwesomeIcon className=\"icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </NavLink>\r\n </div>\r\n <div className=\"project-status-info-container\">\r\n <div className=\"new-issues-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"bug\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Total issues</span>\r\n </div>\r\n <div className=\"issues-solved-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"check\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Issues solved</span>\r\n </div>\r\n <div className=\"last-updated-info\">\r\n <p>Last updated: 1 day ago</p>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"page-content-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"projectlist-title\">Your Projects</h2>\r\n <button className=\"create-new-project-button\">\r\n New Project\r\n </button>\r\n </div>\r\n <div className=\"project-sort-menu-container\">\r\n <div className=\"personal-shared-projects-container\">\r\n <a className={sharedProjectsButtonState ? \"activeUnderlined\" : \"inactive\"} onClick={SharedProjectsButtonActive}>Shared Projects</a>\r\n <a className={personalProjectsButtonState ? \"activeUnderlined\" : \"inactive\"} onClick={PersonalProjectsButtonActive}>Personal Projects</a>\r\n </div>\r\n <div className=\"project-sort-select-container\">\r\n <p>Sort by:</p>\r\n <select>\r\n <option>Last updated</option>\r\n <option>Last created</option>\r\n <option>Name</option>\r\n <option>Name descending</option>\r\n <option>Oldest created</option>\r\n <option>Oldest updated</option>\r\n </select>\r\n </div>\r\n </div>\r\n {sharedProjectsButtonState ? ProjectsDisplay(sharedProjects) : ProjectsDisplay(personalProjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default ProjectOverview","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamInfo\\TeamInfo.jsx",["145"],"import React, { useRef, useState, useEffect } from 'react'\r\nimport \"./TeamInfo.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\n\r\nconst TeamInfo = () => {\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 return (\r\n <div className=\"page-content-container\">\r\n <div className=\"teamInformationPage-content-header\">\r\n <div className=\"header-text\">\r\n <h2 className=\"teamInformationPage-title\">Henriks Meme machine > overview</h2>\r\n </div>\r\n <div className=\"header-notification-select-settings-button-container\">\r\n <div className=\"notification-button-container\">\r\n <button className={`notification-button ${isActive ? 'active' : 'inactive'}`} onClick={onClick} >\r\n <FontAwesomeIcon className=\"bell-icon\" icon=\"bell\"></FontAwesomeIcon>\r\n <FontAwesomeIcon className=\"down-arrow\" icon=\"angle-down\"></FontAwesomeIcon>\r\n </button>\r\n <div ref={dropdownRef} className={`user-dropDown-menu-content ${isActive ? 'active' : 'inactive'}`}>\r\n <ul>\r\n <li>\r\n <a>\r\n <FontAwesomeIcon icon=\"user\"></FontAwesomeIcon> Account\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <div className=\"settings-button-container\">\r\n <button>\r\n <FontAwesomeIcon icon=\"cog\"></FontAwesomeIcon>\r\n Settings\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"teamInformationPage-content-container\">\r\n {/*TODO: components goes here */}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default TeamInfo","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamOverview\\TeamOverview.jsx",["146","147"],"import React from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./TeamOverview.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst TeamOverview = () => {\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }, { name: \"Teskeholdet\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n return (\r\n <div className=\"page-content-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"teamlist-title\">Teams</h2>\r\n <div className=\"buttons-container\">\r\n <button className=\"join-team-button\">\r\n Join Team\r\n </button>\r\n <button className=\"create-new-team-button\">\r\n New team\r\n </button>\r\n </div>\r\n </div>\r\n <div className=\"teamlist\">\r\n <ul>\r\n <li>\r\n <div className=\"team-entry\">\r\n <div className=\"image-team-name\">\r\n <NavLink to=\"/HenriksMemeMachine\" className=\"team-image-container\">\r\n <FontAwesomeIcon className=\"team-icon\" icon=\"dice-d6\"></FontAwesomeIcon>\r\n </NavLink>\r\n <NavLink to=\"/HenriksMemeMachine\">Henriks meme machine - ReactApp \r\n <FontAwesomeIcon className=\"icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </NavLink>\r\n </div>\r\n <div className=\"team-status-info-container\">\r\n <div className=\"new-messages-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"envelope\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">New messages</span>\r\n </div>\r\n <div className=\"projects-maintained-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"project-diagram\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Projects maintained</span>\r\n </div>\r\n <div className=\"team-members-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"users\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Team members</span>\r\n </div>\r\n <div className=\"last-updated-info\">\r\n <p>Date created: 21/ 07/ 2021</p>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div >\r\n )\r\n}\r\n\r\nexport default TeamOverview","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\assign\\Assign.jsx",["148","149","150","151","152","153"],"import React, { useState } from 'react'\r\nimport \"./Assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }, { name: \"Teskeholdet\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"multi-level\">\r\n <div className=\"item\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\">\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a> {rootDirectoryObjects[0].id} </a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n\r\n <ul>\r\n {personalProjects.map((elements, index) => (\r\n <li className=\"personalProjectsItem\">\r\n <input type=\"checkbox\" id={`A-${index}`} />\r\n <label for={`A-${index}`}>\r\n <FontAwesomeIcon icon=\"angle-right\" className=\"project-icon\"></FontAwesomeIcon>\r\n <a> {personalProjects[index].id} </a>\r\n </label>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n\r\n <div className=\"item\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\">\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a> {rootDirectoryObjects[1].id} </a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li><div className=\"sub-item\">\r\n <input type=\"checkbox\" id={`B-${index}`} />\r\n <label for={`B-${index}`}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a> {sharedProjects[index].id} </a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n\r\n <ul>\r\n {sharedProjects[index].teams.map(team => (\r\n <li><div className=\"team-item\">\r\n <input type=\"checkbox\" id={`team-${team.name}`} />\r\n <label for={`team-${team.name}`}>\r\n <FontAwesomeIcon icon=\"users\" className=\"users-icon\"></FontAwesomeIcon>\r\n <a> {team.name} </a>\r\n </label>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\updates\\Updates.jsx",["154","155","156","157"],"import React from 'react'\r\nimport \"./Updates.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport useMessages from '../../../util/useMessages'\r\n\r\nconst Updates = () => {\r\n const messages = useMessages()\r\n\r\n return (\r\n <div className=\"project-updates-new-messages-container\">\r\n\r\n <div className=\"project-updates-display-container\">\r\n <div className=\"project-updates-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"exclamation\"></FontAwesomeIcon>\r\n New project updates\r\n </p>\r\n </div>\r\n <div className=\"project-updates-display-content\">\r\n <div className=\"project-update-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [project] [new issues] [issues fixed]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [team] [time]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div className=\"new-messages-display-container\">\r\n <div className=\"new-messages-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"envelope\"></FontAwesomeIcon>\r\n New messages\r\n </p>\r\n </div>\r\n {messages ? messages.map((message) => (\r\n <div className=\"new-messages-display-content\">\r\n <div className=\"new-message-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [{message.sender}] [{message.id}]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [team] [{message.date}]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n )) : \"Loading messages\"}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Updates","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activitiesDisplay\\ActivitiesDisplay.jsx",["158","159","160","161"],"import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport React from 'react'\r\nimport \"./ActivitiesDisplay.css\"\r\n\r\nconst ActivitiesDisplay = () => {\r\n return (\r\n <div className=\"activity-new-issues-display-container\">\r\n\r\n <div className=\"new-issues-display-container\">\r\n <div className=\"new-issues-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"inbox\"></FontAwesomeIcon>\r\n New issue reports\r\n </p>\r\n </div>\r\n <div className=\"new-issues-display-content\">\r\n <div className=\"new-issue-report-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [Severity] [type]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [project] [time]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div className=\"activity-display-container\">\r\n <div className=\"activity-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"sticky-note\"></FontAwesomeIcon>\r\n Recent Team activities\r\n </p>\r\n </div>\r\n <div className=\"activity-display-content\">\r\n <div className=\"new-issue-report-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [Name] [action]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [project] [time]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ActivitiesDisplay","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activityChart\\ActivityChart.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\Navbar.jsx",["162"],"import React from 'react'\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport \"./Navbar.css\"\r\nimport Logo from './logo/Logo'\r\nimport NavLinks from './navLinks/NavLinks'\r\nimport Searchbar from './searchbar/Searchbar'\r\nimport NavbarDropdownMenu from './dropdownMenu/NavbarDropdownMenu'\r\n\r\nconst Navbar = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n\r\n if (!authState || !authState.isAuthenticated) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className=\"navbar\" >\r\n <div className=\"header-content\">\r\n <div className=\"title-navigation-links-container\">\r\n <Logo />\r\n <NavLinks />\r\n </div>\r\n <div className=\"searchbar-profile-container\">\r\n <ul className=\"right-unstyled-navbar\">\r\n <Searchbar />\r\n <NavbarDropdownMenu />\r\n </ul>\r\n </div>\r\n </div>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Navbar","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\logo\\Logo.jsx",["163","164"],"import React from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Logo.css\"\r\nimport logo_picture from \"../../../images/bird-logo.jpg\"\r\nimport logo_text from \"../../../images/logo-text.jpg\"\r\n\r\nconst Logo = () => {\r\n return (\r\n <h1 className=\"title\">\r\n <span className=\"title-icon\">\r\n <NavLink to=\"/home\" id=\"logo\">\r\n <img src={logo_picture} width=\"24\" height=\"24\"></img>\r\n <img src={logo_text} width=\"48\" height=\"24\"></img>\r\n </NavLink>\r\n </span>\r\n </h1>\r\n )\r\n}\r\n\r\nexport default Logo","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\navLinks\\NavLinks.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\searchbar\\Searchbar.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\dropdownMenu\\NavbarDropdownMenu.jsx",["165"],"import React, { useRef, useState, useEffect } from 'react'\r\nimport { NavLink } 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 <li>\r\n <NavLink to=\"/account\" onClick={onClick} className=\"top-item\">\r\n <div>\r\n <FontAwesomeIcon icon=\"user\" className=\"item-icon-top\"></FontAwesomeIcon> \r\n </div>\r\n <div className=\"item-top-text\">\r\n <span>\r\n <p className=\"top-row\">Account</p>\r\n <p className=\"bottom-row\">{userInfo ? userInfo.email : \"...\"}</p>\r\n </span>\r\n </div>\r\n <div className=\"item-last-flex-item\">\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"item-icon-top\"></FontAwesomeIcon>\r\n </div>\r\n </NavLink>\r\n </li>\r\n <li>\r\n <NavLink to=\"/messages\" onClick={onClick}>\r\n <FontAwesomeIcon icon=\"envelope\"></FontAwesomeIcon> Messages\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </NavLink>\r\n </li>\r\n {/* <li>\r\n <a href=\"./\">\r\n <FontAwesomeIcon icon=\"sliders-h\"></FontAwesomeIcon> Preferences\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </a>\r\n </li> */}\r\n <li>\r\n <a onClick={logout}>\r\n <FontAwesomeIcon icon=\"sign-out-alt\"></FontAwesomeIcon> 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","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\Account.jsx",["166"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\signUp\\SignUp.jsx",["167","168","169","170"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\passwordReset\\PasswordForgotModal.jsx",["171","172"],"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\n\r\n// TODO : Clean up and make more like the message modal component\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\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 fetch(config.serviceAPI.forgotPasswordURL, ForgotPasswordRequestOptions)\r\n .then((res) => {\r\n if (!res.ok) {\r\n window.alert(\"Error: something went wrong\")\r\n console.log(res)\r\n Promise.reject(\"\")\r\n return\r\n }\r\n if (res.ok) {\r\n toggleForgotPasswordFormVisible()\r\n setSubmitOkMessageModalState(true)\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 \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 ${submitOkMessageModalState ? \"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","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\messageModal\\MessageModal.jsx",["173"],"import React from 'react'\r\n\r\nconst MessageModal = ({ removeModal, headerMessage, bodyMessage }) => {\r\n const stopProp = e => {\r\n e.stopPropagation()\r\n }\r\n\r\n return (\r\n <div className=\"modal-content\" onClick={e => removeModal()}>\r\n <div className=\"submitOkModal\">\r\n <h2>{headerMessage}</h2>\r\n <label>\r\n {bodyMessage}\r\n </label>\r\n <button className=\"formSubmitButton\" onClick={e => removeModal()}>\r\n Ok\r\n </button>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MessageModal\r\n","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\confirmRemoveAccountModal\\ConfirmRemoveAccountModal.jsx",["174"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\updateUserData\\UpdateUserDataModal.jsx",["175","176"],{"ruleId":"177","replacedBy":"178"},{"ruleId":"179","replacedBy":"180"},{"ruleId":"181","severity":1,"message":"182","line":1,"column":1,"nodeType":"183","endLine":16,"endColumn":3},{"ruleId":"184","severity":1,"message":"185","line":47,"column":6,"nodeType":"186","endLine":47,"endColumn":17,"suggestions":"187"},{"ruleId":"177","replacedBy":"188"},{"ruleId":"179","replacedBy":"189"},{"ruleId":"190","severity":1,"message":"191","line":1,"column":27,"nodeType":"192","messageId":"193","endLine":1,"endColumn":36},{"ruleId":"190","severity":1,"message":"194","line":1,"column":38,"nodeType":"192","messageId":"193","endLine":1,"endColumn":44},{"ruleId":"190","severity":1,"message":"195","line":6,"column":10,"nodeType":"192","messageId":"193","endLine":6,"endColumn":17},{"ruleId":"190","severity":1,"message":"196","line":7,"column":8,"nodeType":"192","messageId":"193","endLine":7,"endColumn":14},{"ruleId":"190","severity":1,"message":"197","line":8,"column":8,"nodeType":"192","messageId":"193","endLine":8,"endColumn":14},{"ruleId":"190","severity":1,"message":"198","line":32,"column":9,"nodeType":"192","messageId":"193","endLine":32,"endColumn":28},{"ruleId":"190","severity":1,"message":"199","line":1,"column":17,"nodeType":"192","messageId":"193","endLine":1,"endColumn":25},{"ruleId":"200","severity":1,"message":"201","line":75,"column":11,"nodeType":"202","endLine":75,"endColumn":123},{"ruleId":"200","severity":1,"message":"201","line":76,"column":11,"nodeType":"202","endLine":76,"endColumn":127},{"ruleId":"200","severity":1,"message":"201","line":43,"column":19,"nodeType":"202","endLine":43,"endColumn":22},{"ruleId":"190","severity":1,"message":"203","line":8,"column":9,"nodeType":"192","messageId":"193","endLine":8,"endColumn":25},{"ruleId":"190","severity":1,"message":"204","line":13,"column":9,"nodeType":"192","messageId":"193","endLine":13,"endColumn":23},{"ruleId":"190","severity":1,"message":"199","line":1,"column":17,"nodeType":"192","messageId":"193","endLine":1,"endColumn":25},{"ruleId":"200","severity":1,"message":"201","line":29,"column":13,"nodeType":"202","endLine":29,"endColumn":16},{"ruleId":"200","severity":1,"message":"201","line":39,"column":19,"nodeType":"202","endLine":39,"endColumn":22},{"ruleId":"200","severity":1,"message":"201","line":50,"column":13,"nodeType":"202","endLine":50,"endColumn":16},{"ruleId":"200","severity":1,"message":"201","line":60,"column":19,"nodeType":"202","endLine":60,"endColumn":22},{"ruleId":"200","severity":1,"message":"201","line":70,"column":25,"nodeType":"202","endLine":70,"endColumn":28},{"ruleId":"200","severity":1,"message":"201","line":23,"column":17,"nodeType":"202","endLine":23,"endColumn":20},{"ruleId":"200","severity":1,"message":"201","line":28,"column":17,"nodeType":"202","endLine":28,"endColumn":20},{"ruleId":"200","severity":1,"message":"201","line":52,"column":19,"nodeType":"202","endLine":52,"endColumn":22},{"ruleId":"200","severity":1,"message":"201","line":57,"column":19,"nodeType":"202","endLine":57,"endColumn":22},{"ruleId":"200","severity":1,"message":"201","line":20,"column":17,"nodeType":"202","endLine":20,"endColumn":20},{"ruleId":"200","severity":1,"message":"201","line":25,"column":17,"nodeType":"202","endLine":25,"endColumn":20},{"ruleId":"200","severity":1,"message":"201","line":48,"column":17,"nodeType":"202","endLine":48,"endColumn":20},{"ruleId":"200","severity":1,"message":"201","line":53,"column":17,"nodeType":"202","endLine":53,"endColumn":20},{"ruleId":"190","severity":1,"message":"205","line":10,"column":22,"nodeType":"192","messageId":"193","endLine":10,"endColumn":30},{"ruleId":"206","severity":1,"message":"207","line":12,"column":11,"nodeType":"202","endLine":12,"endColumn":58},{"ruleId":"206","severity":1,"message":"207","line":13,"column":11,"nodeType":"202","endLine":13,"endColumn":55},{"ruleId":"200","severity":1,"message":"201","line":88,"column":15,"nodeType":"202","endLine":88,"endColumn":35},{"ruleId":"208","severity":1,"message":"209","line":26,"column":70,"nodeType":"210","messageId":"211","endLine":26,"endColumn":72},{"ruleId":"190","severity":1,"message":"212","line":8,"column":11,"nodeType":"192","messageId":"193","endLine":8,"endColumn":20},{"ruleId":"190","severity":1,"message":"213","line":9,"column":10,"nodeType":"192","messageId":"193","endLine":9,"endColumn":22},{"ruleId":"184","severity":1,"message":"214","line":31,"column":6,"nodeType":"186","endLine":31,"endColumn":33,"suggestions":"215"},{"ruleId":"208","severity":1,"message":"209","line":84,"column":20,"nodeType":"210","messageId":"211","endLine":84,"endColumn":22},{"ruleId":"184","severity":1,"message":"216","line":38,"column":6,"nodeType":"186","endLine":38,"endColumn":41,"suggestions":"217"},{"ruleId":"200","severity":1,"message":"201","line":71,"column":11,"nodeType":"202","endLine":71,"endColumn":56},{"ruleId":"190","severity":1,"message":"218","line":4,"column":9,"nodeType":"192","messageId":"193","endLine":4,"endColumn":17},{"ruleId":"190","severity":1,"message":"218","line":11,"column":9,"nodeType":"192","messageId":"193","endLine":11,"endColumn":17},{"ruleId":"190","severity":1,"message":"219","line":9,"column":9,"nodeType":"192","messageId":"193","endLine":9,"endColumn":20},{"ruleId":"190","severity":1,"message":"218","line":11,"column":9,"nodeType":"192","messageId":"193","endLine":11,"endColumn":17},"no-native-reassign",["220"],"no-negated-in-lhs",["221"],"import/no-anonymous-default-export","Assign object to a variable before exporting as module default","ExportDefaultDeclaration","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'oktaAuth'. Either include it or remove the dependency array.","ArrayExpression",["222"],["220"],["221"],"no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'useRef' is defined but never used.","'NavLink' is defined but never used.","'signUp' is defined but never used.","'config' is defined but never used.","'loginRequestOptions' is assigned a value but never used.","'useState' is defined but never used.","jsx-a11y/anchor-is-valid","The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","JSXOpeningElement","'personalProjects' is assigned a value but never used.","'sharedProjects' is assigned a value but never used.","'oktaAuth' is assigned a value but never used.","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","'authState' is assigned a value but never used.","'sessionToken' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'toggleSignUpFormVisible'. Either include it or remove the dependency array.",["223"],"React Hook useEffect has a missing dependency: 'toggleForgotPasswordFormVisible'. Either include it or remove the dependency array.",["224"],"'stopProp' is assigned a value but never used.","'accessToken' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"225","fix":"226"},{"desc":"227","fix":"228"},{"desc":"229","fix":"230"},"Update the dependencies array to be: [authState, oktaAuth]",{"range":"231","text":"232"},"Update the dependencies array to be: [signUpFormVisibilityState, toggleSignUpFormVisible]",{"range":"233","text":"234"},"Update the dependencies array to be: [forgotPasswordFormVisibilityState, toggleForgotPasswordFormVisible]",{"range":"235","text":"236"},[1422,1433],"[authState, oktaAuth]",[1028,1055],"[signUpFormVisibilityState, toggleSignUpFormVisible]",[1372,1407],"[forgotPasswordFormVisibilityState, toggleForgotPasswordFormVisible]"]
\ No newline at end of file
[{"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\index.js":"1","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\App.jsx":"2","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\config.js":"3","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useMessages.jsx":"4","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useInput.jsx":"5","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\Login.jsx":"6","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\Messages\\Messages.jsx":"7","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\ReportForm.jsx":"8","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\Home.jsx":"9","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\ProjectInfo.jsx":"10","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectOverview\\ProjectOverview.jsx":"11","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamInfo\\TeamInfo.jsx":"12","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamOverview\\TeamOverview.jsx":"13","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\assign\\Assign.jsx":"14","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\updates\\Updates.jsx":"15","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activitiesDisplay\\ActivitiesDisplay.jsx":"16","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activityChart\\ActivityChart.jsx":"17","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\Navbar.jsx":"18","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\logo\\Logo.jsx":"19","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\navLinks\\NavLinks.jsx":"20","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\searchbar\\Searchbar.jsx":"21","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\dropdownMenu\\NavbarDropdownMenu.jsx":"22","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\Account.jsx":"23","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\signUp\\SignUp.jsx":"24","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\passwordReset\\PasswordForgotModal.jsx":"25","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\messageModal\\MessageModal.jsx":"26","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\changePassword\\ChangePassword.js":"27","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\removeAccount\\RemoveAccount.js":"28","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\updateUserData\\UpdateUserData.js":"29","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\removeAccount\\confirmRemoveAccountModal\\ConfirmRemoveAccountModal.jsx":"30","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\updateUserData\\updateUserDataModal\\UpdateUserDataModal.jsx":"31"},{"size":285,"mtime":1628516023915,"results":"32","hashOfConfig":"33"},{"size":2100,"mtime":1630074941213,"results":"34","hashOfConfig":"33"},{"size":610,"mtime":1630408468434,"results":"35","hashOfConfig":"33"},{"size":1489,"mtime":1629790769379,"results":"36","hashOfConfig":"33"},{"size":324,"mtime":1629371594261,"results":"37","hashOfConfig":"33"},{"size":2713,"mtime":1630395059503,"results":"38","hashOfConfig":"33"},{"size":626,"mtime":1628697746462,"results":"39","hashOfConfig":"33"},{"size":3967,"mtime":1628695632288,"results":"40","hashOfConfig":"33"},{"size":1279,"mtime":1630089091700,"results":"41","hashOfConfig":"33"},{"size":1068,"mtime":1628696051327,"results":"42","hashOfConfig":"33"},{"size":3660,"mtime":1629794572456,"results":"43","hashOfConfig":"33"},{"size":2374,"mtime":1628696187694,"results":"44","hashOfConfig":"33"},{"size":2694,"mtime":1628696113184,"results":"45","hashOfConfig":"33"},{"size":3264,"mtime":1628535700010,"results":"46","hashOfConfig":"33"},{"size":2334,"mtime":1630060568411,"results":"47","hashOfConfig":"33"},{"size":2096,"mtime":1628430812599,"results":"48","hashOfConfig":"33"},{"size":3570,"mtime":1628430832688,"results":"49","hashOfConfig":"33"},{"size":906,"mtime":1630073002522,"results":"50","hashOfConfig":"33"},{"size":548,"mtime":1628421916010,"results":"51","hashOfConfig":"33"},{"size":697,"mtime":1628430740299,"results":"52","hashOfConfig":"33"},{"size":470,"mtime":1628430752153,"results":"53","hashOfConfig":"33"},{"size":3533,"mtime":1630069281308,"results":"54","hashOfConfig":"33"},{"size":833,"mtime":1630490084877,"results":"55","hashOfConfig":"33"},{"size":5569,"mtime":1630406765555,"results":"56","hashOfConfig":"33"},{"size":3623,"mtime":1630354196170,"results":"57","hashOfConfig":"33"},{"size":546,"mtime":1630352571382,"results":"58","hashOfConfig":"33"},{"size":1711,"mtime":1630488792390,"results":"59","hashOfConfig":"33"},{"size":1193,"mtime":1630489762080,"results":"60","hashOfConfig":"33"},{"size":2268,"mtime":1630490057731,"results":"61","hashOfConfig":"33"},{"size":2031,"mtime":1630411615779,"results":"62","hashOfConfig":"33"},{"size":3283,"mtime":1630409477894,"results":"63","hashOfConfig":"33"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},"iyhzrm",{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"69","messages":"70","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"71","usedDeprecatedRules":"66"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"74","usedDeprecatedRules":"66"},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"77"},{"filePath":"78","messages":"79","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"80","usedDeprecatedRules":"66"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"83","messages":"84","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"85","usedDeprecatedRules":"66"},{"filePath":"86","messages":"87","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"88","messages":"89","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"90","messages":"91","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"92","usedDeprecatedRules":"66"},{"filePath":"93","messages":"94","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"95","usedDeprecatedRules":"66"},{"filePath":"96","messages":"97","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"98","usedDeprecatedRules":"66"},{"filePath":"99","messages":"100","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"101","usedDeprecatedRules":"66"},{"filePath":"102","messages":"103","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"104","usedDeprecatedRules":"66"},{"filePath":"105","messages":"106","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"107","usedDeprecatedRules":"66"},{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"110","messages":"111","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"112","usedDeprecatedRules":"66"},{"filePath":"113","messages":"114","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"115","usedDeprecatedRules":"66"},{"filePath":"116","messages":"117","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"118","messages":"119","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"66"},{"filePath":"120","messages":"121","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"122","usedDeprecatedRules":"66"},{"filePath":"123","messages":"124","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"125","messages":"126","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"127","usedDeprecatedRules":"66"},{"filePath":"128","messages":"129","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"130","usedDeprecatedRules":"66"},{"filePath":"131","messages":"132","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"133","usedDeprecatedRules":"66"},{"filePath":"134","messages":"135","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"140","messages":"141","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"142","messages":"143","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\index.js",[],["144","145"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\App.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\config.js",["146"],"export default {\r\n oidc: {\r\n clientId: '0oa1f4zfeiiZPB6DF5d7',\r\n issuer: 'https://dev-91882654.okta.com/oauth2/default',\r\n redirectUri: window.location.origin + '/login/callback',\r\n scopes: ['openid', 'profile', 'email'],\r\n pkce: true\r\n },\r\n serviceAPI: {\r\n messagesURL: 'http://localhost:3030/api/messages',\r\n createNewUserURL: 'http://localhost:3030/api/create-user',\r\n forgotPasswordURL: 'http://localhost:3030/api/recover-user-password',\r\n removeAccountURL: 'http://localhost:3030/api/remove-user',\r\n updateUserDataURL: 'http://localhost:3030/api/update-user-data'\r\n }\r\n};","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useMessages.jsx",["147"],"import { useState, useEffect } from 'react';\r\nimport { useOktaAuth } from '@okta/okta-react';\r\n\r\nimport config from \"../config\"\r\n\r\nconst useMessages = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [messages, setMessages] = useState(null);\r\n\r\n // fetch messages\r\n useEffect(() => {\r\n if (authState && authState.isAuthenticated) {\r\n const accessToken = oktaAuth.getAccessToken();\r\n fetch(config.serviceAPI.messagesURL, {\r\n method: 'GET',\r\n headers: {\r\n Authorization: `Bearer ${accessToken}`,\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 .then((data) => {\r\n let index = 0;\r\n const formattedMessages = data.messages.map((message) => {\r\n const date = new Date(message.date);\r\n const day = date.toLocaleDateString();\r\n const time = date.toLocaleTimeString();\r\n index += 1;\r\n return {\r\n date: `${day} ${time}`,\r\n sender: message.sender,\r\n text: message.text,\r\n id: `message-${index}`,\r\n };\r\n });\r\n setMessages(formattedMessages);\r\n })\r\n .catch((err) => {\r\n /* eslint-disable no-console */\r\n console.error(err);\r\n });\r\n }\r\n }, [authState]);\r\n\r\n return messages\r\n}\r\n\r\nexport default useMessages","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\util\\useInput.jsx",[],["148","149"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\Login.jsx",["150","151","152","153","154","155"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport { Redirect } from 'react-router-dom'\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport \"./Login.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { NavLink } from 'react-router-dom';\r\nimport signUp from './signUp/SignUp';\r\nimport config from '../../config';\r\nimport SignUp from './signUp/SignUp';\r\nimport PasswordForgotModal from './passwordReset/PasswordForgotModal';\r\n\r\nconst Login = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [sessionToken, setSessionToken] = useState()\r\n\r\n const [username, setUsername] = useState('');\r\n const [password, setPassword] = useState('');\r\n\r\n const handleUsernameChange = (e) => {\r\n setUsername(e.target.value);\r\n };\r\n\r\n const handlePasswordChange = (e) => {\r\n setPassword(e.target.value)\r\n }\r\n\r\n const userInputData = JSON.stringify({\r\n email: `${username}`,\r\n password: `${password}`\r\n })\r\n\r\n const loginRequestOptions = {\r\n method: 'POST',\r\n body: userInputData\r\n };\r\n\r\n const handleSignInFormSubmit = (e) => {\r\n e.preventDefault();\r\n\r\n oktaAuth.signInWithCredentials({ username, 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 if (sessionToken) {\r\n // Hide form while sessionToken is converted into id/access tokens\r\n return null;\r\n }\r\n\r\n if (!authState || !authState.isAuthenticated) {\r\n return (\r\n <div className=\"pageContainer\">\r\n <SignUp />\r\n\r\n <div className=\"signInForm\">\r\n <h2>Sign in to PipIt</h2>\r\n <form onSubmit={handleSignInFormSubmit}>\r\n <label>\r\n Email:\r\n <input\r\n id=\"username\" type=\"text\"\r\n value={username}\r\n onChange={handleUsernameChange} />\r\n </label>\r\n <label>\r\n Password:\r\n <input\r\n id=\"password\" type=\"password\"\r\n value={password}\r\n onChange={handlePasswordChange} />\r\n </label>\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Sign in \r\n <FontAwesomeIcon icon=\"sign-in-alt\"></FontAwesomeIcon>\r\n </button>\r\n </form>\r\n <PasswordForgotModal />\r\n </div>\r\n </div>\r\n )\r\n } else {\r\n return <Redirect to=\"/home\" />\r\n }\r\n}\r\n\r\nexport default Login","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\Messages\\Messages.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\ReportForm.jsx",["156"],"import React, { useState } from 'react'\r\nimport \"./ReportForm.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport Assign from './assign/Assign'\r\n\r\nconst ReportForm = () => {\r\n return (\r\n <div className=\"page-content-container\">\r\n <h2 className=\"reportissuePageText\">Report an issue</h2>\r\n <form action=\"/reportFormData\">\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueType\">Type of issue</label>\r\n </div>\r\n <div className=\"col-75\">\r\n <select id=\"fissueType\" className=\"issueType\">\r\n <option value=\"bug\">Bug</option>\r\n <option value=\"usabilityissue\">Usability error</option>\r\n <option value=\"other\">Other</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-25\">\r\n <label for=\"fissueLocation\">Where did you encounter the issue?</label>\r\n </div>\r\n <div class=\"col-75\">\r\n <input type=\"text\" id=\"fissueLocation\" className=\"issueLocation\" ></input>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-25\">\r\n <label for=\"fissueDescription\">Describe the issue</label>\r\n </div>\r\n <div class=\"col-75\">\r\n <textarea id=\"fissueDescription\" className=\"issueDescription\"></textarea>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-25\">\r\n <label for=\"fissueStepsToTeproduce\">What steps did you take before the issue happened?</label>\r\n </div>\r\n <div class=\"col-75\">\r\n <textarea id=\"fissueStepsToTeproduce\" className=\"issueStepsToReproduce\"\r\n placeholder=\"List the steps that occurred before the issue happened:\r\n1.\r\n2.\r\n3.\r\nExpected Result:\r\nActual Result:\">\r\n </textarea>\r\n </div>\r\n </div>\r\n\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueSeverity\">Severity level</label>\r\n </div>\r\n <div className=\"col-75\">\r\n <select id=\"fissueSeverity\" className=\"issueSeverity\">\r\n <option value=\"cosmetic\">Cosmetic - should be corrected when time permits</option>\r\n <option value=\"serious\">Serious - should be corrected in the next release</option>\r\n <option value=\"critical\">Critical - should be corrected as soon as possible</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueTimeToCorrect\">Time to Correct</label>\r\n </div>\r\n <div className=\"col-75\">\r\n <select id=\"fissueSeverity\" className=\"issueTimeToCorrect\">\r\n <option value=\"lessThanTwoHours\">Less than 2 minutes</option>\r\n <option value=\"lessThanOneToTwoDays\">Less than 1 or 2 days</option>\r\n <option value=\"lessThanOneToTwoWeeks\">Less than 1 or 2 weeks</option>\r\n <option value=\"atLeastTwoWeeks\">More than 2 weeks</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <div className=\"row\">\r\n <div className=\"col-25\">\r\n <label for=\"fissueAssignToProject\">Assign to</label>\r\n </div>\r\n <div className=\"col-75\">\r\n {/*\r\n <select id=\"fissueAssignToProject\" className=\"issueAssignToProject\">\r\n <option value=\"lessThanTwoHours\">Henriks meme machine - ReactApp</option>\r\n </select>\r\n */}\r\n <Assign />\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row\">\r\n <button className=\"formSubmitButton\" type=\"submit\">\r\n Submit \r\n <FontAwesomeIcon icon=\"arrow-right\"></FontAwesomeIcon>\r\n </button>\r\n </div>\r\n </form>\r\n </div >\r\n )\r\n}\r\n\r\nexport default ReportForm","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\Home.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\ProjectInfo.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectOverview\\ProjectOverview.jsx",["157","158"],"import React, { useState } from 'react'\r\nimport { NavLink } from \"react-router-dom\";\r\nimport \"./ProjectOverview.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst ProjectOverview = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }, { name: \"Teskeholdet\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [sharedProjectsButtonState, setSharedProjectsButtonState] = useState(true);\r\n const [personalProjectsButtonState, setPersonalProjectsButtonState] = useState(false);\r\n\r\n const SharedProjectsButtonActive = () => {\r\n setSharedProjectsButtonState(true);\r\n setPersonalProjectsButtonState(false);\r\n };\r\n\r\n const PersonalProjectsButtonActive = () => {\r\n setSharedProjectsButtonState(false);\r\n setPersonalProjectsButtonState(true);\r\n };\r\n\r\n const ProjectsDisplay = (projects) => {\r\n return (\r\n <div className=\"projectlist\">\r\n <ul>\r\n {projects.map((elements, index) => (\r\n <li>\r\n <div className=\"project-entry\">\r\n <div className=\"project-team-name\">\r\n <NavLink to={`/${projects[index].id}`}>{projects[index].id} \r\n <FontAwesomeIcon className=\"icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </NavLink>\r\n </div>\r\n <div className=\"project-status-info-container\">\r\n <div className=\"new-issues-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"bug\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Total issues</span>\r\n </div>\r\n <div className=\"issues-solved-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"check\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Issues solved</span>\r\n </div>\r\n <div className=\"last-updated-info\">\r\n <p>Last updated: 1 day ago</p>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"page-content-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"projectlist-title\">Your Projects</h2>\r\n <button className=\"create-new-project-button\">\r\n New Project\r\n </button>\r\n </div>\r\n <div className=\"project-sort-menu-container\">\r\n <div className=\"personal-shared-projects-container\">\r\n <a className={sharedProjectsButtonState ? \"activeUnderlined\" : \"inactive\"} onClick={SharedProjectsButtonActive}>Shared Projects</a>\r\n <a className={personalProjectsButtonState ? \"activeUnderlined\" : \"inactive\"} onClick={PersonalProjectsButtonActive}>Personal Projects</a>\r\n </div>\r\n <div className=\"project-sort-select-container\">\r\n <p>Sort by:</p>\r\n <select>\r\n <option>Last updated</option>\r\n <option>Last created</option>\r\n <option>Name</option>\r\n <option>Name descending</option>\r\n <option>Oldest created</option>\r\n <option>Oldest updated</option>\r\n </select>\r\n </div>\r\n </div>\r\n {sharedProjectsButtonState ? ProjectsDisplay(sharedProjects) : ProjectsDisplay(personalProjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default ProjectOverview","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamInfo\\TeamInfo.jsx",["159"],"import React, { useRef, useState, useEffect } from 'react'\r\nimport \"./TeamInfo.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\n\r\nconst TeamInfo = () => {\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 return (\r\n <div className=\"page-content-container\">\r\n <div className=\"teamInformationPage-content-header\">\r\n <div className=\"header-text\">\r\n <h2 className=\"teamInformationPage-title\">Henriks Meme machine > overview</h2>\r\n </div>\r\n <div className=\"header-notification-select-settings-button-container\">\r\n <div className=\"notification-button-container\">\r\n <button className={`notification-button ${isActive ? 'active' : 'inactive'}`} onClick={onClick} >\r\n <FontAwesomeIcon className=\"bell-icon\" icon=\"bell\"></FontAwesomeIcon>\r\n <FontAwesomeIcon className=\"down-arrow\" icon=\"angle-down\"></FontAwesomeIcon>\r\n </button>\r\n <div ref={dropdownRef} className={`user-dropDown-menu-content ${isActive ? 'active' : 'inactive'}`}>\r\n <ul>\r\n <li>\r\n <a>\r\n <FontAwesomeIcon icon=\"user\"></FontAwesomeIcon> Account\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <div className=\"settings-button-container\">\r\n <button>\r\n <FontAwesomeIcon icon=\"cog\"></FontAwesomeIcon>\r\n Settings\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"teamInformationPage-content-container\">\r\n {/*TODO: components goes here */}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default TeamInfo","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\team\\teamOverview\\TeamOverview.jsx",["160","161"],"import React from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./TeamOverview.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst TeamOverview = () => {\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }, { name: \"Teskeholdet\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n return (\r\n <div className=\"page-content-container\">\r\n <div className=\"content-header\">\r\n <h2 className=\"teamlist-title\">Teams</h2>\r\n <div className=\"buttons-container\">\r\n <button className=\"join-team-button\">\r\n Join Team\r\n </button>\r\n <button className=\"create-new-team-button\">\r\n New team\r\n </button>\r\n </div>\r\n </div>\r\n <div className=\"teamlist\">\r\n <ul>\r\n <li>\r\n <div className=\"team-entry\">\r\n <div className=\"image-team-name\">\r\n <NavLink to=\"/HenriksMemeMachine\" className=\"team-image-container\">\r\n <FontAwesomeIcon className=\"team-icon\" icon=\"dice-d6\"></FontAwesomeIcon>\r\n </NavLink>\r\n <NavLink to=\"/HenriksMemeMachine\">Henriks meme machine - ReactApp \r\n <FontAwesomeIcon className=\"icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </NavLink>\r\n </div>\r\n <div className=\"team-status-info-container\">\r\n <div className=\"new-messages-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"envelope\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">New messages</span>\r\n </div>\r\n <div className=\"projects-maintained-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"project-diagram\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Projects maintained</span>\r\n </div>\r\n <div className=\"team-members-info\">\r\n <FontAwesomeIcon className=\"icon\" icon=\"users\"></FontAwesomeIcon>\r\n <p>0</p>\r\n <span className=\"tooltip-text\">Team members</span>\r\n </div>\r\n <div className=\"last-updated-info\">\r\n <p>Date created: 21/ 07/ 2021</p>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div >\r\n )\r\n}\r\n\r\nexport default TeamOverview","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\reportForm\\assign\\Assign.jsx",["162","163","164","165","166","167"],"import React, { useState } from 'react'\r\nimport \"./Assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }, { name: \"Teskeholdet\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"multi-level\">\r\n <div className=\"item\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\">\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a> {rootDirectoryObjects[0].id} </a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n\r\n <ul>\r\n {personalProjects.map((elements, index) => (\r\n <li className=\"personalProjectsItem\">\r\n <input type=\"checkbox\" id={`A-${index}`} />\r\n <label for={`A-${index}`}>\r\n <FontAwesomeIcon icon=\"angle-right\" className=\"project-icon\"></FontAwesomeIcon>\r\n <a> {personalProjects[index].id} </a>\r\n </label>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n\r\n <div className=\"item\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\">\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a> {rootDirectoryObjects[1].id} </a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li><div className=\"sub-item\">\r\n <input type=\"checkbox\" id={`B-${index}`} />\r\n <label for={`B-${index}`}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a> {sharedProjects[index].id} </a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n\r\n <ul>\r\n {sharedProjects[index].teams.map(team => (\r\n <li><div className=\"team-item\">\r\n <input type=\"checkbox\" id={`team-${team.name}`} />\r\n <label for={`team-${team.name}`}>\r\n <FontAwesomeIcon icon=\"users\" className=\"users-icon\"></FontAwesomeIcon>\r\n <a> {team.name} </a>\r\n </label>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\home\\updates\\Updates.jsx",["168","169","170","171"],"import React from 'react'\r\nimport \"./Updates.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport useMessages from '../../../util/useMessages'\r\n\r\nconst Updates = () => {\r\n const messages = useMessages()\r\n\r\n return (\r\n <div className=\"project-updates-new-messages-container\">\r\n\r\n <div className=\"project-updates-display-container\">\r\n <div className=\"project-updates-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"exclamation\"></FontAwesomeIcon>\r\n New project updates\r\n </p>\r\n </div>\r\n <div className=\"project-updates-display-content\">\r\n <div className=\"project-update-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [project] [new issues] [issues fixed]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [team] [time]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div className=\"new-messages-display-container\">\r\n <div className=\"new-messages-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"envelope\"></FontAwesomeIcon>\r\n New messages\r\n </p>\r\n </div>\r\n {messages ? messages.map((message) => (\r\n <div className=\"new-messages-display-content\">\r\n <div className=\"new-message-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [{message.sender}] [{message.id}]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [team] [{message.date}]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n )) : \"Loading messages\"}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Updates","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activitiesDisplay\\ActivitiesDisplay.jsx",["172","173","174","175"],"import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport React from 'react'\r\nimport \"./ActivitiesDisplay.css\"\r\n\r\nconst ActivitiesDisplay = () => {\r\n return (\r\n <div className=\"activity-new-issues-display-container\">\r\n\r\n <div className=\"new-issues-display-container\">\r\n <div className=\"new-issues-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"inbox\"></FontAwesomeIcon>\r\n New issue reports\r\n </p>\r\n </div>\r\n <div className=\"new-issues-display-content\">\r\n <div className=\"new-issue-report-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [Severity] [type]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [project] [time]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div className=\"activity-display-container\">\r\n <div className=\"activity-display-header\">\r\n <p>\r\n <FontAwesomeIcon icon=\"sticky-note\"></FontAwesomeIcon>\r\n Recent Team activities\r\n </p>\r\n </div>\r\n <div className=\"activity-display-content\">\r\n <div className=\"new-issue-report-entry\">\r\n <div className=\"entry-text\">\r\n <div className=\"upper-row\">\r\n <a>\r\n [Name] [action]\r\n </a>\r\n </div>\r\n <div className=\"bottom-row\">\r\n <a>\r\n [project] [time]\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <FontAwesomeIcon className=\"entry-icon\" icon=\"chevron-right\"></FontAwesomeIcon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ActivitiesDisplay","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\project\\projectInfo\\activityChart\\ActivityChart.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\Navbar.jsx",["176"],"import React from 'react'\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport \"./Navbar.css\"\r\nimport Logo from './logo/Logo'\r\nimport NavLinks from './navLinks/NavLinks'\r\nimport Searchbar from './searchbar/Searchbar'\r\nimport NavbarDropdownMenu from './dropdownMenu/NavbarDropdownMenu'\r\n\r\nconst Navbar = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n\r\n if (!authState || !authState.isAuthenticated) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className=\"navbar\" >\r\n <div className=\"header-content\">\r\n <div className=\"title-navigation-links-container\">\r\n <Logo />\r\n <NavLinks />\r\n </div>\r\n <div className=\"searchbar-profile-container\">\r\n <ul className=\"right-unstyled-navbar\">\r\n <Searchbar />\r\n <NavbarDropdownMenu />\r\n </ul>\r\n </div>\r\n </div>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Navbar","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\logo\\Logo.jsx",["177","178"],"import React from 'react'\r\nimport { NavLink } from 'react-router-dom'\r\nimport \"./Logo.css\"\r\nimport logo_picture from \"../../../images/bird-logo.jpg\"\r\nimport logo_text from \"../../../images/logo-text.jpg\"\r\n\r\nconst Logo = () => {\r\n return (\r\n <h1 className=\"title\">\r\n <span className=\"title-icon\">\r\n <NavLink to=\"/home\" id=\"logo\">\r\n <img src={logo_picture} width=\"24\" height=\"24\"></img>\r\n <img src={logo_text} width=\"48\" height=\"24\"></img>\r\n </NavLink>\r\n </span>\r\n </h1>\r\n )\r\n}\r\n\r\nexport default Logo","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\navLinks\\NavLinks.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\searchbar\\Searchbar.jsx",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\navbar\\dropdownMenu\\NavbarDropdownMenu.jsx",["179"],"import React, { useRef, useState, useEffect } from 'react'\r\nimport { NavLink } 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 <li>\r\n <NavLink to=\"/account\" onClick={onClick} className=\"top-item\">\r\n <div>\r\n <FontAwesomeIcon icon=\"user\" className=\"item-icon-top\"></FontAwesomeIcon> \r\n </div>\r\n <div className=\"item-top-text\">\r\n <span>\r\n <p className=\"top-row\">Account</p>\r\n <p className=\"bottom-row\">{userInfo ? userInfo.email : \"...\"}</p>\r\n </span>\r\n </div>\r\n <div className=\"item-last-flex-item\">\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"item-icon-top\"></FontAwesomeIcon>\r\n </div>\r\n </NavLink>\r\n </li>\r\n <li>\r\n <NavLink to=\"/messages\" onClick={onClick}>\r\n <FontAwesomeIcon icon=\"envelope\"></FontAwesomeIcon> Messages\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </NavLink>\r\n </li>\r\n {/* <li>\r\n <a href=\"./\">\r\n <FontAwesomeIcon icon=\"sliders-h\"></FontAwesomeIcon> Preferences\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </a>\r\n </li> */}\r\n <li>\r\n <a onClick={logout}>\r\n <FontAwesomeIcon icon=\"sign-out-alt\"></FontAwesomeIcon> 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","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\account\\Account.jsx",["180","181","182"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\signUp\\SignUp.jsx",["183","184","185","186"],"import React, { useState, useEffect, useRef } from 'react'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport config from '../../../config';\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport \"./SignUp.css\"\r\n\r\nconst SignUp = () => {\r\n const { authState, oktaAuth } = useOktaAuth();\r\n const [sessionToken, setSessionToken] = useState()\r\n\r\n const [signUpFormVisibilityState, showSignUpForm] = useState(false)\r\n const signUpFormRef = useRef(null);\r\n const toggleSignUpFormVisible = () => showSignUpForm(!signUpFormVisibilityState)\r\n\r\n useEffect(() => {\r\n const pageClickEvent = (e) => {\r\n if (signUpFormRef.current !== null && !signUpFormRef.current.contains(e.target)) {\r\n toggleSignUpFormVisible()\r\n }\r\n };\r\n\r\n // If the item is active (ie open) then listen for clicks\r\n if (signUpFormVisibilityState) {\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 }, [signUpFormVisibilityState]);\r\n\r\n const [firstname, setFirstname] = useState('')\r\n const [lastname, setLastname] = useState('')\r\n const [username, setUsername] = useState('');\r\n const [password, setPassword] = useState('');\r\n const [confirmPassword, setConfirmPassword] = useState('');\r\n\r\n const userInputData = JSON.stringify({\r\n firstname: `${firstname}`,\r\n lastname: `${lastname}`,\r\n email: `${username}`,\r\n password: `${password}`\r\n })\r\n\r\n const loginRequestOptions = {\r\n method: 'POST',\r\n body: userInputData\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 handleUsernameChange = (e) => {\r\n setUsername(e.target.value);\r\n };\r\n\r\n const handlePasswordChange = (e) => {\r\n setPassword(e.target.value)\r\n }\r\n\r\n const handleConfirmPasswordChange = (e) => {\r\n setConfirmPassword(e.target.value)\r\n }\r\n\r\n const handleSignUpFormSubmit = (e) => {\r\n e.preventDefault();\r\n\r\n if (!password || !confirmPassword) {\r\n window.alert(\"A password field is blank\")\r\n return\r\n }\r\n\r\n if (!(confirmPassword.length >= 7)) {\r\n window.alert(\"Password must consist of 8 characters or more\")\r\n return\r\n }\r\n\r\n if (!(password == confirmPassword)) {\r\n window.alert(\"Passwords fo not match\")\r\n return\r\n }\r\n\r\n else {\r\n fetch(config.serviceAPI.createNewUserURL, loginRequestOptions)\r\n .then((res) => {\r\n if (!res.ok) {\r\n window.alert(\"Error\")\r\n Promise.reject(\"\")\r\n return\r\n }\r\n if (res.ok) {\r\n handleSignInFormSubmit(e)\r\n }\r\n })\r\n }\r\n }\r\n\r\n const handleSignInFormSubmit = (e) => {\r\n e.preventDefault();\r\n\r\n oktaAuth.signInWithCredentials({ username, 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 return (\r\n <div className=\"signUpContainer\">\r\n <div className={`modal ${signUpFormVisibilityState ? \"active\" : \"inactive\"}`}>\r\n <div ref={signUpFormRef} className=\"modal-content\">\r\n <div className=\"signUpForm\">\r\n <h2>Sign Up</h2>\r\n <form onSubmit={handleSignUpFormSubmit}>\r\n <label>\r\n First name:\r\n <input\r\n id=\"firstname\" type=\"text\"\r\n value={firstname}\r\n onChange={handlefirstnameChange} />\r\n </label>\r\n <label>\r\n Last Name:\r\n <input\r\n id=\"lastname\" type=\"text\"\r\n value={lastname}\r\n onChange={handlelastnameChange} />\r\n </label>\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 Password:\r\n <input\r\n id=\"password\" type=\"password\"\r\n value={password}\r\n onChange={handlePasswordChange} />\r\n </label>\r\n <label>\r\n Confirm Password:\r\n <input\r\n id=\"password\" type=\"password\"\r\n value={confirmPassword}\r\n onChange={handleConfirmPasswordChange} />\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 \r\n <FontAwesomeIcon icon=\"user-plus\"></FontAwesomeIcon>\r\n </button>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n\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 <button className=\"signUpForm-show-button\" onClick={toggleSignUpFormVisible}>\r\n Sign up\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n )\r\n}\r\n\r\nexport default SignUp\r\n","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\pages\\login\\passwordReset\\PasswordForgotModal.jsx",["187","188"],"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\n\r\n// TODO : Clean up and make more like the message modal component\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\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 fetch(config.serviceAPI.forgotPasswordURL, ForgotPasswordRequestOptions)\r\n .then((res) => {\r\n if (!res.ok) {\r\n window.alert(\"Error: something went wrong\")\r\n console.log(res)\r\n Promise.reject(\"\")\r\n return\r\n }\r\n if (res.ok) {\r\n toggleForgotPasswordFormVisible()\r\n setSubmitOkMessageModalState(true)\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 \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 ${submitOkMessageModalState ? \"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","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\messageModal\\MessageModal.jsx",["189"],"import React from 'react'\r\n\r\nconst MessageModal = ({ removeModal, headerMessage, bodyMessage }) => {\r\n const stopProp = e => {\r\n e.stopPropagation()\r\n }\r\n\r\n return (\r\n <div className=\"modal-content\" onClick={e => removeModal()}>\r\n <div className=\"submitOkModal\">\r\n <h2>{headerMessage}</h2>\r\n <label>\r\n {bodyMessage}\r\n </label>\r\n <button className=\"formSubmitButton\" onClick={e => removeModal()}>\r\n Ok\r\n </button>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MessageModal\r\n","C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\changePassword\\ChangePassword.js",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\removeAccount\\RemoveAccount.js",[],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\updateUserData\\UpdateUserData.js",["190"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\removeAccount\\confirmRemoveAccountModal\\ConfirmRemoveAccountModal.jsx",["191"],"C:\\Users\\Bruger\\Desktop\\Web-projects\\pipit\\client\\src\\components\\updateUserData\\updateUserDataModal\\UpdateUserDataModal.jsx",["192","193"],{"ruleId":"194","replacedBy":"195"},{"ruleId":"196","replacedBy":"197"},{"ruleId":"198","severity":1,"message":"199","line":1,"column":1,"nodeType":"200","endLine":16,"endColumn":3},{"ruleId":"201","severity":1,"message":"202","line":47,"column":6,"nodeType":"203","endLine":47,"endColumn":17,"suggestions":"204"},{"ruleId":"194","replacedBy":"205"},{"ruleId":"196","replacedBy":"206"},{"ruleId":"207","severity":1,"message":"208","line":1,"column":27,"nodeType":"209","messageId":"210","endLine":1,"endColumn":36},{"ruleId":"207","severity":1,"message":"211","line":1,"column":38,"nodeType":"209","messageId":"210","endLine":1,"endColumn":44},{"ruleId":"207","severity":1,"message":"212","line":6,"column":10,"nodeType":"209","messageId":"210","endLine":6,"endColumn":17},{"ruleId":"207","severity":1,"message":"213","line":7,"column":8,"nodeType":"209","messageId":"210","endLine":7,"endColumn":14},{"ruleId":"207","severity":1,"message":"214","line":8,"column":8,"nodeType":"209","messageId":"210","endLine":8,"endColumn":14},{"ruleId":"207","severity":1,"message":"215","line":32,"column":9,"nodeType":"209","messageId":"210","endLine":32,"endColumn":28},{"ruleId":"207","severity":1,"message":"216","line":1,"column":17,"nodeType":"209","messageId":"210","endLine":1,"endColumn":25},{"ruleId":"217","severity":1,"message":"218","line":75,"column":11,"nodeType":"219","endLine":75,"endColumn":123},{"ruleId":"217","severity":1,"message":"218","line":76,"column":11,"nodeType":"219","endLine":76,"endColumn":127},{"ruleId":"217","severity":1,"message":"218","line":43,"column":19,"nodeType":"219","endLine":43,"endColumn":22},{"ruleId":"207","severity":1,"message":"220","line":8,"column":9,"nodeType":"209","messageId":"210","endLine":8,"endColumn":25},{"ruleId":"207","severity":1,"message":"221","line":13,"column":9,"nodeType":"209","messageId":"210","endLine":13,"endColumn":23},{"ruleId":"207","severity":1,"message":"216","line":1,"column":17,"nodeType":"209","messageId":"210","endLine":1,"endColumn":25},{"ruleId":"217","severity":1,"message":"218","line":29,"column":13,"nodeType":"219","endLine":29,"endColumn":16},{"ruleId":"217","severity":1,"message":"218","line":39,"column":19,"nodeType":"219","endLine":39,"endColumn":22},{"ruleId":"217","severity":1,"message":"218","line":50,"column":13,"nodeType":"219","endLine":50,"endColumn":16},{"ruleId":"217","severity":1,"message":"218","line":60,"column":19,"nodeType":"219","endLine":60,"endColumn":22},{"ruleId":"217","severity":1,"message":"218","line":70,"column":25,"nodeType":"219","endLine":70,"endColumn":28},{"ruleId":"217","severity":1,"message":"218","line":23,"column":17,"nodeType":"219","endLine":23,"endColumn":20},{"ruleId":"217","severity":1,"message":"218","line":28,"column":17,"nodeType":"219","endLine":28,"endColumn":20},{"ruleId":"217","severity":1,"message":"218","line":52,"column":19,"nodeType":"219","endLine":52,"endColumn":22},{"ruleId":"217","severity":1,"message":"218","line":57,"column":19,"nodeType":"219","endLine":57,"endColumn":22},{"ruleId":"217","severity":1,"message":"218","line":20,"column":17,"nodeType":"219","endLine":20,"endColumn":20},{"ruleId":"217","severity":1,"message":"218","line":25,"column":17,"nodeType":"219","endLine":25,"endColumn":20},{"ruleId":"217","severity":1,"message":"218","line":48,"column":17,"nodeType":"219","endLine":48,"endColumn":20},{"ruleId":"217","severity":1,"message":"218","line":53,"column":17,"nodeType":"219","endLine":53,"endColumn":20},{"ruleId":"207","severity":1,"message":"222","line":10,"column":22,"nodeType":"209","messageId":"210","endLine":10,"endColumn":30},{"ruleId":"223","severity":1,"message":"224","line":12,"column":11,"nodeType":"219","endLine":12,"endColumn":58},{"ruleId":"223","severity":1,"message":"224","line":13,"column":11,"nodeType":"219","endLine":13,"endColumn":55},{"ruleId":"217","severity":1,"message":"218","line":88,"column":15,"nodeType":"219","endLine":88,"endColumn":35},{"ruleId":"207","severity":1,"message":"216","line":2,"column":17,"nodeType":"209","messageId":"210","endLine":2,"endColumn":25},{"ruleId":"207","severity":1,"message":"208","line":2,"column":27,"nodeType":"209","messageId":"210","endLine":2,"endColumn":36},{"ruleId":"207","severity":1,"message":"225","line":5,"column":8,"nodeType":"209","messageId":"210","endLine":5,"endColumn":33},{"ruleId":"207","severity":1,"message":"226","line":8,"column":11,"nodeType":"209","messageId":"210","endLine":8,"endColumn":20},{"ruleId":"207","severity":1,"message":"227","line":9,"column":10,"nodeType":"209","messageId":"210","endLine":9,"endColumn":22},{"ruleId":"201","severity":1,"message":"228","line":31,"column":6,"nodeType":"203","endLine":31,"endColumn":33,"suggestions":"229"},{"ruleId":"230","severity":1,"message":"231","line":84,"column":20,"nodeType":"232","messageId":"233","endLine":84,"endColumn":22},{"ruleId":"201","severity":1,"message":"234","line":38,"column":6,"nodeType":"203","endLine":38,"endColumn":41,"suggestions":"235"},{"ruleId":"217","severity":1,"message":"218","line":71,"column":11,"nodeType":"219","endLine":71,"endColumn":56},{"ruleId":"207","severity":1,"message":"236","line":4,"column":9,"nodeType":"209","messageId":"210","endLine":4,"endColumn":17},{"ruleId":"230","severity":1,"message":"231","line":20,"column":70,"nodeType":"232","messageId":"233","endLine":20,"endColumn":72},{"ruleId":"207","severity":1,"message":"236","line":11,"column":9,"nodeType":"209","messageId":"210","endLine":11,"endColumn":17},{"ruleId":"207","severity":1,"message":"237","line":9,"column":9,"nodeType":"209","messageId":"210","endLine":9,"endColumn":20},{"ruleId":"207","severity":1,"message":"236","line":11,"column":9,"nodeType":"209","messageId":"210","endLine":11,"endColumn":17},"no-native-reassign",["238"],"no-negated-in-lhs",["239"],"import/no-anonymous-default-export","Assign object to a variable before exporting as module default","ExportDefaultDeclaration","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'oktaAuth'. Either include it or remove the dependency array.","ArrayExpression",["240"],["238"],["239"],"no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'useRef' is defined but never used.","'NavLink' is defined but never used.","'signUp' is defined but never used.","'config' is defined but never used.","'loginRequestOptions' is assigned a value but never used.","'useState' is defined but never used.","jsx-a11y/anchor-is-valid","The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","JSXOpeningElement","'personalProjects' is assigned a value but never used.","'sharedProjects' is assigned a value but never used.","'oktaAuth' is assigned a value but never used.","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","'ConfirmRemoveAccountModal' is defined but never used.","'authState' is assigned a value but never used.","'sessionToken' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'toggleSignUpFormVisible'. Either include it or remove the dependency array.",["241"],"eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","React Hook useEffect has a missing dependency: 'toggleForgotPasswordFormVisible'. Either include it or remove the dependency array.",["242"],"'stopProp' is assigned a value but never used.","'accessToken' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"243","fix":"244"},{"desc":"245","fix":"246"},{"desc":"247","fix":"248"},"Update the dependencies array to be: [authState, oktaAuth]",{"range":"249","text":"250"},"Update the dependencies array to be: [signUpFormVisibilityState, toggleSignUpFormVisible]",{"range":"251","text":"252"},"Update the dependencies array to be: [forgotPasswordFormVisibilityState, toggleForgotPasswordFormVisible]",{"range":"253","text":"254"},[1422,1433],"[authState, oktaAuth]",[1028,1055],"[signUpFormVisibilityState, toggleSignUpFormVisible]",[1372,1407],"[forgotPasswordFormVisibilityState, toggleForgotPasswordFormVisible]"]
\ No newline at end of file
client/node_modules/.cache/babel-loader/045b54c635c7edc272f776bb152554e6.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
updateUserData
\\\\
UpdateUserData.js
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useEffect, useState } from 'react';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import UpdateUserDataModal from '../../components/updateUserData/updateUserDataModal/UpdateUserDataModal';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const UpdateUserData = () => {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const [name, setName] = useState('');
\n
const [email, setEmail] = useState('');
\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false);
\n\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState);
\n\n
useEffect(() => {
\n
if (!authState.isAuthenticated) {
\n
// When user isn't authenticated, forget any user info
\n
setUserInfo(null);
\n
} else if (authState.isAuthenticated && updateUserDataModalState == false) {
\n
oktaAuth.getUser().then(info => {
\n
setUserInfo(info);
\n
});
\n
}
\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\n\n
useEffect(() => {
\n
userInfo && setName(userInfo.name);
\n
userInfo && setEmail(userInfo.email);
\n
}, [userInfo]);
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
personal-information-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
user-circle
\"
,
\n
className:
\"
user-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 40,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Personal information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 41,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleUpdateUserDataModalState,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
pen
\"
,
\n
className:
\"
pen-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 43,
\n
columnNumber: 11
\n
}, this),
\"
Edit
\"
]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 42,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 39,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Name:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 50,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 49,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? name :
\"
Fetching name
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? email :
\"
Fetching email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 58,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 48,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 47,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(UpdateUserDataModal, {
\n
removeModal: () => setUpdateUserDataModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 64,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 38,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(UpdateUserData,
\"
TVJKyWZdBHB4T7R5lFB40t17n2E=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = UpdateUserData;
\n
export default UpdateUserData;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
UpdateUserData
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/updateUserData/UpdateUserData.js"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"FontAwesomeIcon"
,
"useOktaAuth"
,
"UpdateUserDataModal"
,
"UpdateUserData"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"name"
,
"setName"
,
"email"
,
"setEmail"
,
"updateUserDataModalState"
,
"setUpdateUserDataModalState"
,
"toggleUpdateUserDataModalState"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,eAAT,QAAgC,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[
"import React, { useEffect, useState } from 'react'
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import UpdateUserDataModal from '../../components/updateUserData/updateUserDataModal/UpdateUserDataModal';
\r\n\r\n
const UpdateUserData = () => {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n\r\n
const [name, setName] = useState('')
\r\n
const [email, setEmail] = useState('');
\r\n\r\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false)
\r\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState)
\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 if (authState.isAuthenticated && updateUserDataModalState == false) {
\r\n
oktaAuth.getUser().then(info => {
\r\n
setUserInfo(info);
\r\n
});
\r\n
}
\r\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\r\n\r\n
useEffect(() => {
\r\n
userInfo && (
\r\n
setName(userInfo.name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setEmail(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n
return (
\r\n
<div className=
\"
personal-information-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
user-circle
\"
className=
\"
user-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Personal information</h5>
\r\n
<button onClick={toggleUpdateUserDataModalState}>
\r\n
<FontAwesomeIcon icon=
\"
pen
\"
className=
\"
pen-icon
\"
></FontAwesomeIcon>
\r\n
Edit
\r\n
</button>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<ul>
\r\n
<li>
\r\n
<b>Name:</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? name :
\"
Fetching name
\"
}
\r\n
</li>
\r\n
<li>
\r\n
<b>Email</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? email :
\"
Fetching email
\"
}
\r\n
</li>
\r\n
</ul>
\r\n
</div>
\r\n
<div className={`modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<UpdateUserDataModal removeModal={() => setUpdateUserDataModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default UpdateUserData
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/0bd2c3adb5af04ce7df49b9f64fbf9e5.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
Account.jsx
\"
;
\n
// rfce
\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./Account.css
\"
;
\n
import ConfirmRemoveAccountModal from
\"
../../components/removeAccount/confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"
;
\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\n
import RemoveAccount from '../../components/removeAccount/RemoveAccount';
\n
import UpdateUserData from '../../components/updateUserData/UpdateUserData';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function Account() {
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
page-content-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content-header
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
className:
\"
welcome-text
\"
,
\n
children:
\"
Account information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 14,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 13,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
accountpage-content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(ChangePassword, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 18,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(RemoveAccount, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 19,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(UpdateUserData, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 20,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 16,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 12,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_c = Account;
\n
export default Account;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
Account
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/Account.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"ConfirmRemoveAccountModal"
,
"ChangePassword"
,
"RemoveAccount"
,
"UpdateUserData"
,
"Account"
],
"mappings"
:
";AAAA;AACA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,eAAP;AAEA,OAAOC,yBAAP,MAAsC,oFAAtC;AACA,OAAOC,cAAP,MAA2B,gDAA3B;AACA,OAAOC,aAAP,MAA0B,8CAA1B;AACA,OAAOC,cAAP,MAA2B,gDAA3B;;;AAEA,SAASC,OAAT,GAAmB;AACjB,sBACE;AAAK,IAAA,SAAS,EAAC,wBAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,gBAAf;AAAA,6BACE;AAAI,QAAA,SAAS,EAAC,cAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF,eAIE;AAAK,MAAA,SAAS,EAAC,qBAAf;AAAA,8BAEE,QAAC,cAAD;AAAA;AAAA;AAAA;AAAA,cAFF,eAGE,QAAC,aAAD;AAAA;AAAA;AAAA;AAAA,cAHF,eAIE,QAAC,cAAD;AAAA;AAAA;AAAA;AAAA,cAJF;AAAA;AAAA;AAAA;AAAA;AAAA,YAJF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAcD;;KAfQA,O;AAiBT,eAAeA,OAAf"
,
"sourcesContent"
:[
"// rfce
\r\n
import React, { useState, useEffect } from 'react'
\r\n
import
\"
./Account.css
\"\r\n\r\n
import ConfirmRemoveAccountModal from
\"
../../components/removeAccount/confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"\r\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\r\n
import RemoveAccount from '../../components/removeAccount/RemoveAccount';
\r\n
import UpdateUserData from '../../components/updateUserData/UpdateUserData';
\r\n\r\n
function Account() {
\r\n
return (
\r\n
<div className=
\"
page-content-container
\"
>
\r\n
<div className=
\"
content-header
\"
>
\r\n
<h2 className=
\"
welcome-text
\"
>Account information</h2>
\r\n
</div>
\r\n
<div className=
\"
accountpage-content
\"
>
\r\n\r\n
<ChangePassword />
\r\n
<RemoveAccount />
\r\n
<UpdateUserData />
\r\n\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default Account
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/2cc98f639a5cbf4266d1422f09d6d885.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
Account.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
// rfce
\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./Account.css
\"
;
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"
;
\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function Account() {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const [name, setName] = useState('');
\n
const [email, setEmail] = useState('');
\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false);
\n\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState);
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
useEffect(() => {
\n
if (!authState.isAuthenticated) {
\n
// When user isn't authenticated, forget any user info
\n
setUserInfo(null);
\n
} else if (authState.isAuthenticated && updateUserDataModalState == false) {
\n
oktaAuth.getUser().then(info => {
\n
setUserInfo(info);
\n
});
\n
}
\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\n\n
useEffect(() => {
\n
userInfo && setName(userInfo.name);
\n
userInfo && setEmail(userInfo.email);
\n
}, [userInfo]);
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
page-content-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content-header
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
className:
\"
welcome-text
\"
,
\n
children:
\"
Account information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 48,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 47,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
accountpage-content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
personal-information-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
user-circle
\"
,
\n
className:
\"
user-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Personal information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleUpdateUserDataModalState,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
pen
\"
,
\n
className:
\"
pen-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 15
\n
}, this),
\"
Edit
\"
]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 53,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Name:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 64,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? name :
\"
Fetching name
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 66,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 70,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 69,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? email :
\"
Fetching email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 72,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(ChangePassword, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 79,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
deactivate-account-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
trash
\"
,
\n
className:
\"
trash-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 83,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Delete account
\"\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(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Your account and all your data will be permanently deleted
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 87,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleConfirmAccountRemoveModalState,
\n
children: [
\"
Delete
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
exclamation-triangle
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 92,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 90,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 86,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 81,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 50,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setConfirmAccountRemoveModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 98,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 97,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(UpdateUserDataModal, {
\n
removeModal: () => setUpdateUserDataModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 101,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 100,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 46,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(Account,
\"
mspcEj1apxAoqwV3paiS9+TXXfg=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = Account;
\n
export default Account;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
Account
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/Account.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"FontAwesomeIcon"
,
"useOktaAuth"
,
"ConfirmRemoveAccountModal"
,
"UpdateUserDataModal"
,
"ChangePassword"
,
"Account"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"name"
,
"setName"
,
"email"
,
"setEmail"
,
"updateUserDataModalState"
,
"setUpdateUserDataModalState"
,
"toggleUpdateUserDataModalState"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"toggleConfirmAccountRemoveModalState"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA;AACA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,eAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAOC,yBAAP,MAAsC,uDAAtC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AAA;AAAA;AAAA;AAAA,UADF;AA4DD;;GA/FQV,O;UACyBJ,W;;;KADzBI,O;AAiGT,eAAeA,OAAf"
,
"sourcesContent"
:[
"// rfce
\r\n
import React, { useState, useEffect } from 'react'
\r\n
import
\"
./Account.css
\"\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"\r\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\r\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\r\n\r\n
function Account() {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n\r\n
const [name, setName] = useState('')
\r\n
const [email, setEmail] = useState('');
\r\n\r\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false)
\r\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState)
\r\n\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\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 if (authState.isAuthenticated && updateUserDataModalState == false) {
\r\n
oktaAuth.getUser().then(info => {
\r\n
setUserInfo(info);
\r\n
});
\r\n
}
\r\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\r\n\r\n
useEffect(() => {
\r\n
userInfo && (
\r\n
setName(userInfo.name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setEmail(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n\r\n
return (
\r\n
<div className=
\"
page-content-container
\"
>
\r\n
<div className=
\"
content-header
\"
>
\r\n
<h2 className=
\"
welcome-text
\"
>Account information</h2>
\r\n
</div>
\r\n
<div className=
\"
accountpage-content
\"
>
\r\n\r\n
<div className=
\"
personal-information-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
user-circle
\"
className=
\"
user-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Personal information</h5>
\r\n
<button onClick={toggleUpdateUserDataModalState}>
\r\n
<FontAwesomeIcon icon=
\"
pen
\"
className=
\"
pen-icon
\"
></FontAwesomeIcon>
\r\n
Edit
\r\n
</button>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<ul>
\r\n
<li>
\r\n
<b>Name:</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? name :
\"
Fetching name
\"
}
\r\n
</li>
\r\n
<li>
\r\n
<b>Email</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? email :
\"
Fetching email
\"
}
\r\n
</li>
\r\n
</ul>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<ChangePassword />
\r\n\r\n
<div className=
\"
deactivate-account-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
trash
\"
className=
\"
trash-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Delete account</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>
\r\n
Your account and all your data will be permanently deleted
\r\n
</p>
\r\n
<button onClick={toggleConfirmAccountRemoveModalState}>
\r\n
Delete
\r\n
<FontAwesomeIcon icon=
\"
exclamation-triangle
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
<div className={`modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<ConfirmRemoveAccountModal removeModal={() => setConfirmAccountRemoveModalState(false)} />
\r\n
</div>
\r\n
<div className={`modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<UpdateUserDataModal removeModal={() => setUpdateUserDataModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default Account
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/35f97b1ff2f52d9bca1a5dc6c394d7b4.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
Account.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
// rfce
\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./Account.css
\"
;
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"
;
\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function Account() {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const [name, setName] = useState('');
\n
const [email, setEmail] = useState('');
\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false);
\n\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState);
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
useEffect(() => {
\n
if (!authState.isAuthenticated) {
\n
// When user isn't authenticated, forget any user info
\n
setUserInfo(null);
\n
} else if (authState.isAuthenticated && updateUserDataModalState == false) {
\n
oktaAuth.getUser().then(info => {
\n
setUserInfo(info);
\n
});
\n
}
\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\n\n
useEffect(() => {
\n
userInfo && setName(userInfo.name);
\n
userInfo && setEmail(userInfo.email);
\n
}, [userInfo]);
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
page-content-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content-header
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
className:
\"
welcome-text
\"
,
\n
children:
\"
Account information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 47,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 46,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
accountpage-content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
personal-information-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
user-circle
\"
,
\n
className:
\"
user-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 53,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Personal information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleUpdateUserDataModalState,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
pen
\"
,
\n
className:
\"
pen-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 15
\n
}, this),
\"
Edit
\"
]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Name:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? name :
\"
Fetching name
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 65,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 69,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 68,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? email :
\"
Fetching email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 71,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 51,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
change-password-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
lock
\"
,
\n
className:
\"
lock-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 80,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Change password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 81,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 79,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Password requirements:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 84,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
At least 8 characters
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 86,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
No parts of username may be included
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 89,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
Your password cannot be any of the last 4 passwords
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 92,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 85,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
form
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
reset-password-form-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Old password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 99,
\n
columnNumber: 19
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 102,
\n
columnNumber: 19
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 98,
\n
columnNumber: 17
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
New password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 105,
\n
columnNumber: 19
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 108,
\n
columnNumber: 19
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 104,
\n
columnNumber: 17
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Confirm new password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 111,
\n
columnNumber: 19
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 114,
\n
columnNumber: 19
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 110,
\n
columnNumber: 17
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
passwordResetSubmitButton
\"
,
\n
type:
\"
submit
\"
,
\n
children: [
\"
Submit
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
arrow-right
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 119,
\n
columnNumber: 21
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 117,
\n
columnNumber: 19
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 116,
\n
columnNumber: 17
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 97,
\n
columnNumber: 15
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 96,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 83,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 78,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
deactivate-account-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
trash
\"
,
\n
className:
\"
trash-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 129,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 130,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 128,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Your account and all your data will be permanently deleted
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 133,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleConfirmAccountRemoveModalState,
\n
children: [
\"
Delete
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
exclamation-triangle
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 138,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 136,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 132,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 127,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 49,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setConfirmAccountRemoveModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 144,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 143,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(UpdateUserDataModal, {
\n
removeModal: () => setUpdateUserDataModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 147,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 146,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 45,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(Account,
\"
mspcEj1apxAoqwV3paiS9+TXXfg=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = Account;
\n
export default Account;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
Account
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/Account.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"FontAwesomeIcon"
,
"useOktaAuth"
,
"ConfirmRemoveAccountModal"
,
"UpdateUserDataModal"
,
"Account"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"name"
,
"setName"
,
"email"
,
"setEmail"
,
"updateUserDataModalState"
,
"setUpdateUserDataModalState"
,
"toggleUpdateUserDataModalState"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"toggleConfirmAccountRemoveModalState"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA;AACA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,eAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAOC,yBAAP,MAAsC,uDAAtC;AACA,OAAOC,mBAAP,MAAgC,sCAAhC;;;AAEA,SAASC,OAAT,GAAmB;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BL,WAAW,EAA3C;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QAAH,GAAc,UAAW,EAA1E;AAAA,6BACE,QAAC,mBAAD;AAAqB,QAAA,WAAW,EAAE,MAAMC,2BAA2B,CAAC,KAAD;AAAnE;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YArGF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AA2GD;;GA9IQV,O;UACyBH,W;;;KADzBG,O;AAgJT,eAAeA,OAAf"
,
"sourcesContent"
:[
"// rfce
\r\n
import React, { useState, useEffect } from 'react'
\r\n
import
\"
./Account.css
\"\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"\r\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\r\n\r\n
function Account() {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n\r\n
const [name, setName] = useState('')
\r\n
const [email, setEmail] = useState('');
\r\n\r\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false)
\r\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState)
\r\n\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\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 if (authState.isAuthenticated && updateUserDataModalState == false) {
\r\n
oktaAuth.getUser().then(info => {
\r\n
setUserInfo(info);
\r\n
});
\r\n
}
\r\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\r\n\r\n
useEffect(() => {
\r\n
userInfo && (
\r\n
setName(userInfo.name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setEmail(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n\r\n
return (
\r\n
<div className=
\"
page-content-container
\"
>
\r\n
<div className=
\"
content-header
\"
>
\r\n
<h2 className=
\"
welcome-text
\"
>Account information</h2>
\r\n
</div>
\r\n
<div className=
\"
accountpage-content
\"
>
\r\n\r\n
<div className=
\"
personal-information-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
user-circle
\"
className=
\"
user-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Personal information</h5>
\r\n
<button onClick={toggleUpdateUserDataModalState}>
\r\n
<FontAwesomeIcon icon=
\"
pen
\"
className=
\"
pen-icon
\"
></FontAwesomeIcon>
\r\n
Edit
\r\n
</button>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<ul>
\r\n
<li>
\r\n
<b>Name:</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? name :
\"
Fetching name
\"
}
\r\n
</li>
\r\n
<li>
\r\n
<b>Email</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? email :
\"
Fetching email
\"
}
\r\n
</li>
\r\n
</ul>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<div className=
\"
change-password-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
lock
\"
className=
\"
lock-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Change password</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>Password requirements:</p>
\r\n
<ul>
\r\n
<li>
\r\n
At least 8 characters
\r\n
</li>
\r\n
<li>
\r\n
No parts of username may be included
\r\n
</li>
\r\n
<li>
\r\n
Your password cannot be any of the last 4 passwords
\r\n
</li>
\r\n
</ul>
\r\n
<form>
\r\n
<div className=
\"
reset-password-form-container
\"
>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
Old password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
New password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
Confirm new password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<button className=
\"
passwordResetSubmitButton
\"
type=
\"
submit
\"
>
\r\n
Submit
\r\n
<FontAwesomeIcon icon=
\"
arrow-right
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</form>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<div className=
\"
deactivate-account-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
trash
\"
className=
\"
trash-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Delete account</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>
\r\n
Your account and all your data will be permanently deleted
\r\n
</p>
\r\n
<button onClick={toggleConfirmAccountRemoveModalState}>
\r\n
Delete
\r\n
<FontAwesomeIcon icon=
\"
exclamation-triangle
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
<div className={`modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<ConfirmRemoveAccountModal removeModal={() => setConfirmAccountRemoveModalState(false)} />
\r\n
</div>
\r\n
<div className={`modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<UpdateUserDataModal removeModal={() => setUpdateUserDataModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default Account
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/4671a0eb7a68d0c6c93250cea451c7c8.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
Account.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
// rfce
\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./Account.css
\"
;
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"
;
\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\n
import RemoveAccount from '../../components/removeAccount/RemoveAccount';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function Account() {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const [name, setName] = useState('');
\n
const [email, setEmail] = useState('');
\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false);
\n\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState);
\n\n
useEffect(() => {
\n
if (!authState.isAuthenticated) {
\n
// When user isn't authenticated, forget any user info
\n
setUserInfo(null);
\n
} else if (authState.isAuthenticated && updateUserDataModalState == false) {
\n
oktaAuth.getUser().then(info => {
\n
setUserInfo(info);
\n
});
\n
}
\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\n\n
useEffect(() => {
\n
userInfo && setName(userInfo.name);
\n
userInfo && setEmail(userInfo.email);
\n
}, [userInfo]);
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
page-content-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content-header
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
className:
\"
welcome-text
\"
,
\n
children:
\"
Account information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 46,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 45,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
accountpage-content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
personal-information-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
user-circle
\"
,
\n
className:
\"
user-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Personal information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 53,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleUpdateUserDataModalState,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
pen
\"
,
\n
className:
\"
pen-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 15
\n
}, this),
\"
Edit
\"
]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 51,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Name:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? name :
\"
Fetching name
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 64,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 68,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 67,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? email :
\"
Fetching email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 70,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 59,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 50,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(ChangePassword, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 77,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(RemoveAccount, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 78,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 48,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(UpdateUserDataModal, {
\n
removeModal: () => setUpdateUserDataModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 81,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 80,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 44,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(Account,
\"
TVJKyWZdBHB4T7R5lFB40t17n2E=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = Account;
\n
export default Account;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
Account
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/Account.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"FontAwesomeIcon"
,
"useOktaAuth"
,
"ConfirmRemoveAccountModal"
,
"UpdateUserDataModal"
,
"ChangePassword"
,
"RemoveAccount"
,
"Account"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"name"
,
"setName"
,
"email"
,
"setEmail"
,
"updateUserDataModalState"
,
"setUpdateUserDataModalState"
,
"toggleUpdateUserDataModalState"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA;AACA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,eAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAOC,yBAAP,MAAsC,uDAAtC;AACA,OAAOC,mBAAP,MAAgC,sCAAhC;AACA,OAAOC,cAAP,MAA2B,gDAA3B;AACA,OAAOC,aAAP,MAA0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AJF,eAoCE;AAAK,MAAA,SAAS,EAAG,SAAQE,wBAAwB,GAAG,QAAH,GAAc,UAAW,EAA1E;AAAA,6BACE,QAAC,mBAAD;AAAqB,QAAA,WAAW,EAAE,MAAMC,2BAA2B,CAAC,KAAD;AAAnE;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YApCF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AA0CD;;GA1EQV,O;UACyBL,W;;;KADzBK,O;AA4ET,eAAeA,OAAf"
,
"sourcesContent"
:[
"// rfce
\r\n
import React, { useState, useEffect } from 'react'
\r\n
import
\"
./Account.css
\"\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"\r\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\r\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\r\n
import RemoveAccount from '../../components/removeAccount/RemoveAccount';
\r\n\r\n
function Account() {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n\r\n
const [name, setName] = useState('')
\r\n
const [email, setEmail] = useState('');
\r\n\r\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false)
\r\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState)
\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 if (authState.isAuthenticated && updateUserDataModalState == false) {
\r\n
oktaAuth.getUser().then(info => {
\r\n
setUserInfo(info);
\r\n
});
\r\n
}
\r\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\r\n\r\n
useEffect(() => {
\r\n
userInfo && (
\r\n
setName(userInfo.name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setEmail(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n\r\n
return (
\r\n
<div className=
\"
page-content-container
\"
>
\r\n
<div className=
\"
content-header
\"
>
\r\n
<h2 className=
\"
welcome-text
\"
>Account information</h2>
\r\n
</div>
\r\n
<div className=
\"
accountpage-content
\"
>
\r\n\r\n
<div className=
\"
personal-information-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
user-circle
\"
className=
\"
user-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Personal information</h5>
\r\n
<button onClick={toggleUpdateUserDataModalState}>
\r\n
<FontAwesomeIcon icon=
\"
pen
\"
className=
\"
pen-icon
\"
></FontAwesomeIcon>
\r\n
Edit
\r\n
</button>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<ul>
\r\n
<li>
\r\n
<b>Name:</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? name :
\"
Fetching name
\"
}
\r\n
</li>
\r\n
<li>
\r\n
<b>Email</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? email :
\"
Fetching email
\"
}
\r\n
</li>
\r\n
</ul>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<ChangePassword />
\r\n
<RemoveAccount />
\r\n
</div>
\r\n
<div className={`modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<UpdateUserDataModal removeModal={() => setUpdateUserDataModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default Account
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/4812864e1699be3ceed00b0c9f8e6817.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
Account.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
// rfce
\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./Account.css
\"
;
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"
;
\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function Account() {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const [name, setName] = useState('');
\n
const [email, setEmail] = useState('');
\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false);
\n\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState);
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
useEffect(() => {
\n
if (!authState.isAuthenticated) {
\n
// When user isn't authenticated, forget any user info
\n
setUserInfo(null);
\n
} else if (authState.isAuthenticated && updateUserDataModalState == false) {
\n
oktaAuth.getUser().then(info => {
\n
setUserInfo(info);
\n
});
\n
}
\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\n\n
useEffect(() => {
\n
userInfo && setName(userInfo.name);
\n
userInfo && setEmail(userInfo.email);
\n
}, [userInfo]);
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
page-content-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content-header
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
className:
\"
welcome-text
\"
,
\n
children:
\"
Account information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 48,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 47,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
accountpage-content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
personal-information-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
user-circle
\"
,
\n
className:
\"
user-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Personal information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleUpdateUserDataModalState,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
pen
\"
,
\n
className:
\"
pen-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 15
\n
}, this),
\"
Edit
\"
]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 53,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Name:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 64,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? name :
\"
Fetching name
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 66,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 70,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 69,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? email :
\"
Fetching email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 72,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(ChangePassword, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 79,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
deactivate-account-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
trash
\"
,
\n
className:
\"
trash-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 83,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Delete account
\"\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(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Your account and all your data will be permanently deleted
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 87,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleConfirmAccountRemoveModalState,
\n
children:
\"
Delete
\\
xA0
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 90,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 86,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 81,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 50,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setConfirmAccountRemoveModalState(false)
\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), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(UpdateUserDataModal, {
\n
removeModal: () => setUpdateUserDataModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 100,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 99,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 46,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(Account,
\"
mspcEj1apxAoqwV3paiS9+TXXfg=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = Account;
\n
export default Account;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
Account
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/Account.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"FontAwesomeIcon"
,
"useOktaAuth"
,
"ConfirmRemoveAccountModal"
,
"UpdateUserDataModal"
,
"ChangePassword"
,
"Account"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"name"
,
"setName"
,
"email"
,
"setEmail"
,
"updateUserDataModalState"
,
"setUpdateUserDataModalState"
,
"toggleUpdateUserDataModalState"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"toggleConfirmAccountRemoveModalState"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA;AACA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,eAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAOC,yBAAP,MAAsC,uDAAtC;AACA,OAAOC,mBAAP,MAAgC,sCAAhC;AACA,OAAOC,cAAP,MAA2B,gDAA3B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"
./Account.css
\"\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"\r\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\r\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\r\n\r\n
function Account() {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n\r\n
const [name, setName] = useState('')
\r\n
const [email, setEmail] = useState('');
\r\n\r\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false)
\r\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState)
\r\n\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\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 if (authState.isAuthenticated && updateUserDataModalState == false) {
\r\n
oktaAuth.getUser().then(info => {
\r\n
setUserInfo(info);
\r\n
});
\r\n
}
\r\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\r\n\r\n
useEffect(() => {
\r\n
userInfo && (
\r\n
setName(userInfo.name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setEmail(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n\r\n
return (
\r\n
<div className=
\"
page-content-container
\"
>
\r\n
<div className=
\"
content-header
\"
>
\r\n
<h2 className=
\"
welcome-text
\"
>Account information</h2>
\r\n
</div>
\r\n
<div className=
\"
accountpage-content
\"
>
\r\n\r\n
<div className=
\"
personal-information-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
user-circle
\"
className=
\"
user-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Personal information</h5>
\r\n
<button onClick={toggleUpdateUserDataModalState}>
\r\n
<FontAwesomeIcon icon=
\"
pen
\"
className=
\"
pen-icon
\"
></FontAwesomeIcon>
\r\n
Edit
\r\n
</button>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<ul>
\r\n
<li>
\r\n
<b>Name:</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? name :
\"
Fetching name
\"
}
\r\n
</li>
\r\n
<li>
\r\n
<b>Email</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? email :
\"
Fetching email
\"
}
\r\n
</li>
\r\n
</ul>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<ChangePassword />
\r\n\r\n
<div className=
\"
deactivate-account-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
trash
\"
className=
\"
trash-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Delete account</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>
\r\n
Your account and all your data will be permanently deleted
\r\n
</p>
\r\n
<button onClick={toggleConfirmAccountRemoveModalState}>
\r\n
Delete
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
<div className={`modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<ConfirmRemoveAccountModal removeModal={() => setConfirmAccountRemoveModalState(false)} />
\r\n
</div>
\r\n
<div className={`modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<UpdateUserDataModal removeModal={() => setUpdateUserDataModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default Account
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/6967714585a8bec30b0821a034cdcf20.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
Account.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
// rfce
\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./Account.css
\"
;
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"
;
\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function Account() {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const [name, setName] = useState('');
\n
const [email, setEmail] = useState('');
\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false);
\n\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState);
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
useEffect(() => {
\n
if (!authState.isAuthenticated) {
\n
// When user isn't authenticated, forget any user info
\n
setUserInfo(null);
\n
} else if (authState.isAuthenticated && updateUserDataModalState == false) {
\n
oktaAuth.getUser().then(info => {
\n
setUserInfo(info);
\n
});
\n
}
\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\n\n
useEffect(() => {
\n
userInfo && setName(userInfo.name);
\n
userInfo && setEmail(userInfo.email);
\n
}, [userInfo]);
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
page-content-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content-header
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
className:
\"
welcome-text
\"
,
\n
children:
\"
Account information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 47,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 46,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
accountpage-content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
personal-information-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
user-circle
\"
,
\n
className:
\"
user-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 53,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Personal information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleUpdateUserDataModalState,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
pen
\"
,
\n
className:
\"
pen-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 15
\n
}, this),
\"
Edit
\"
]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Name:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? name :
\"
Fetching name
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 65,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 69,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 68,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? email :
\"
Fetching email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 71,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 51,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
change-password-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
lock
\"
,
\n
className:
\"
lock-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 80,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Change password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 81,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 79,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Password requirements:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 84,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
At least 8 characters
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 86,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
No parts of username may be included
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 89,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
Your password cannot be any of the last 4 passwords
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 92,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 85,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
form
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
reset-password-form-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Old password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 99,
\n
columnNumber: 19
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 102,
\n
columnNumber: 19
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 98,
\n
columnNumber: 17
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
New password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 105,
\n
columnNumber: 19
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 108,
\n
columnNumber: 19
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 104,
\n
columnNumber: 17
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Confirm new password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 111,
\n
columnNumber: 19
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 114,
\n
columnNumber: 19
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 110,
\n
columnNumber: 17
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
passwordResetSubmitButton
\"
,
\n
type:
\"
submit
\"
,
\n
children: [
\"
Submit
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
arrow-right
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 119,
\n
columnNumber: 21
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 117,
\n
columnNumber: 19
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 116,
\n
columnNumber: 17
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 97,
\n
columnNumber: 15
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 96,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 83,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 78,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
deactivate-account-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
trash
\"
,
\n
className:
\"
trash-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 129,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 130,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 128,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Your account and all your data will be permanently deleted
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 133,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleConfirmAccountRemoveModalState,
\n
children: [
\"
Delete
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
exclamation-triangle
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 138,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 136,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 132,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 127,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 49,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setConfirmAccountRemoveModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 144,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 143,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(UpdateUserDataModal, {
\n
removeModal: () => setUpdateUserDataModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 147,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 146,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 45,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(Account,
\"
mspcEj1apxAoqwV3paiS9+TXXfg=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = Account;
\n
export default Account;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
Account
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/Account.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"FontAwesomeIcon"
,
"useOktaAuth"
,
"ConfirmRemoveAccountModal"
,
"UpdateUserDataModal"
,
"Account"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"name"
,
"setName"
,
"email"
,
"setEmail"
,
"updateUserDataModalState"
,
"setUpdateUserDataModalState"
,
"toggleUpdateUserDataModalState"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"toggleConfirmAccountRemoveModalState"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA;AACA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,eAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAOC,yBAAP,MAAsC,uDAAtC;AACA,OAAOC,mBAAP,MAAgC,sCAAhC;;;AAEA,SAASC,OAAT,GAAmB;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BL,WAAW,EAA3C;AACA,QAAM,CAACM,QAAD,EAAWC,WAAX,IAA0BV,QAAQ,CAAC,IAAD,CAAxC;AAEA,QAAM,CAACW,IAAD,EAAOC,OAAP,IAAkBZ,QAAQ,CAAC,EAAD,CAAhC;AACA,QAAM,CAACa,KAAD,EAAQC,QAAR,IAAoBd,QAAQ,CAAC,EAAD,CAAlC;AAEA,QAAM,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BH,W;;;KADzBG,O;AAgJT,eAAeA,OAAf"
,
"sourcesContent"
:[
"// rfce
\r\n
import React, { useState, useEffect } from 'react'
\r\n
import
\"
./Account.css
\"\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"\r\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\r\n\r\n
function Account() {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n\r\n
const [name, setName] = useState('')
\r\n
const [email, setEmail] = useState('');
\r\n\r\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false)
\r\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState)
\r\n\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\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 if (authState.isAuthenticated && updateUserDataModalState == false) {
\r\n
oktaAuth.getUser().then(info => {
\r\n
setUserInfo(info);
\r\n
});
\r\n
}
\r\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\r\n\r\n
useEffect(() => {
\r\n
userInfo && (
\r\n
setName(userInfo.name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setEmail(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n\r\n
return (
\r\n
<div className=
\"
page-content-container
\"
>
\r\n
<div className=
\"
content-header
\"
>
\r\n
<h2 className=
\"
welcome-text
\"
>Account information</h2>
\r\n
</div>
\r\n
<div className=
\"
accountpage-content
\"
>
\r\n\r\n
<div className=
\"
personal-information-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
user-circle
\"
className=
\"
user-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Personal information</h5>
\r\n
<button onClick={toggleUpdateUserDataModalState}>
\r\n
<FontAwesomeIcon icon=
\"
pen
\"
className=
\"
pen-icon
\"
></FontAwesomeIcon>
\r\n
Edit
\r\n
</button>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<ul>
\r\n
<li>
\r\n
<b>Name:</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? name :
\"
Fetching name
\"
}
\r\n
</li>
\r\n
<li>
\r\n
<b>Email</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? email :
\"
Fetching email
\"
}
\r\n
</li>
\r\n
</ul>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<div className=
\"
change-password-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
lock
\"
className=
\"
lock-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Change password</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>Password requirements:</p>
\r\n
<ul>
\r\n
<li>
\r\n
At least 8 characters
\r\n
</li>
\r\n
<li>
\r\n
No parts of username may be included
\r\n
</li>
\r\n
<li>
\r\n
Your password cannot be any of the last 4 passwords
\r\n
</li>
\r\n
</ul>
\r\n
<form>
\r\n
<div className=
\"
reset-password-form-container
\"
>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
Old password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
New password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
Confirm new password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<button className=
\"
passwordResetSubmitButton
\"
type=
\"
submit
\"
>
\r\n
Submit
\r\n
<FontAwesomeIcon icon=
\"
arrow-right
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</form>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<div className=
\"
deactivate-account-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
trash
\"
className=
\"
trash-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Delete account</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>
\r\n
Your account and all your data will be permanently deleted
\r\n
</p>
\r\n
<button onClick={toggleConfirmAccountRemoveModalState}>
\r\n
Delete
\r\n
<FontAwesomeIcon icon=
\"
exclamation-triangle
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
<div className={`modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<ConfirmRemoveAccountModal removeModal={() => setConfirmAccountRemoveModalState(false)} />
\r\n
</div>
\r\n
<div className={`modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<UpdateUserDataModal removeModal={() => setUpdateUserDataModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default Account
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/7bc8e5d214c0756f3c70c158efc1f5ae.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
updateUserData
\\\\
updateUserDataModal
\\\\
UpdateUserDataModal.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./UpdateUserDataModal.css
\"
;
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import config from '../../../config';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const UpdateUserDataModal = ({
\n
removeModal
\n
}) => {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const accessToken = oktaAuth.getAccessToken();
\n\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\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
useEffect(() => {
\n
userInfo && setFirstname(userInfo.given_name);
\n
userInfo && setLastname(userInfo.family_name);
\n
userInfo && setUsername(userInfo.email);
\n
}, [userInfo]);
\n
const [firstname, setFirstname] = useState('');
\n
const [lastname, setLastname] = useState('');
\n
const [username, setUsername] = useState('');
\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 handleUsernameChange = e => {
\n
setUsername(e.target.value);
\n
};
\n\n
const userInputData = JSON.stringify({
\n
firstname: `${firstname}`,
\n
lastname: `${lastname}`,
\n
email: `${username}`
\n
});
\n
const updateUserDataRequestOptions = {
\n
method: 'PUT',
\n
body: userInputData
\n
};
\n\n
const handleUpdateUserDataFormSubmit = e => {
\n
e.preventDefault();
\n
fetch(config.serviceAPI.updateUserDataURL, updateUserDataRequestOptions).then(res => {
\n
if (!res.ok) {
\n
window.alert(
\"
Error
\"
);
\n
Promise.reject(
\"\"
);
\n
return;
\n
}
\n\n
if (res.ok) {
\n
removeModal();
\n
}
\n
});
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
updateUserDataModal
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children:
\"
Update information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 86,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
userDataSubmitForm: true,
\n
children: /*#__PURE__*/_jsxDEV(
\"
form
\"
, {
\n
onSubmit: handleUpdateUserDataFormSubmit,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children: [
\"
First name:
\"
, /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
id:
\"
firstname
\"
,
\n
type:
\"
text
\"
,
\n
value: firstname,
\n
onChange: handlefirstnameChange
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 91,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 89,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children: [
\"
Last Name:
\"
, /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
id:
\"
lastname
\"
,
\n
type:
\"
text
\"
,
\n
value: lastname,
\n
onChange: handlelastnameChange
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 98,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 96,
\n
columnNumber: 13
\n
}, this), /*#__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: 105,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 103,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
buttonContainer
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
noButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
Cancel
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 111,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
type:
\"
submit
\"
,
\n
children:
\"
Update
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 114,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 110,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 88,
\n
columnNumber: 11
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 87,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 85,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 84,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(UpdateUserDataModal,
\"
AxzdzHC979Yq9E6/6HJDjeCl4CA=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = UpdateUserDataModal;
\n
export default UpdateUserDataModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
UpdateUserDataModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/updateUserData/updateUserDataModal/UpdateUserDataModal.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"useOktaAuth"
,
"config"
,
"UpdateUserDataModal"
,
"removeModal"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"accessToken"
,
"getAccessToken"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"setFirstname"
,
"given_name"
,
"setLastname"
,
"family_name"
,
"setUsername"
,
"email"
,
"firstname"
,
"lastname"
,
"username"
,
"handlefirstnameChange"
,
"target"
,
"value"
,
"handlelastnameChange"
,
"handleUsernameChange"
,
"userInputData"
,
"JSON"
,
"stringify"
,
"updateUserDataRequestOptions"
,
"method"
,
"body"
,
"handleUpdateUserDataFormSubmit"
,
"preventDefault"
,
"fetch"
,
"serviceAPI"
,
"updateUserDataURL"
,
"res"
,
"ok"
,
"window"
,
"alert"
,
"Promise"
,
"reject"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,2BAAP;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAOC,MAAP,MAAmB,iBAAnB;;;AAEA,MAAMC,mBAAmB,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAqB;AAAA;;AAC/C,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BL,WAAW,EAA3C;AACA,QAAM,CAACM,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;AACA,QAAMU,WAAW,GAAGH,QAAQ,CAACI,cAAT,EAApB;;AAEA,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIAb,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACK,SAAS,CAACS,eAAf,EAAgC;AAC9B;AACAN,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACS,OAAT,GAAmBC,IAAnB,CAAwBC,IAAI,IAAI;AAC9BT,Q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A,QAAQ,EAAEK;AAHZ;AAAA;AAAA;AAAA;AAAA,oBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,kBAfF,eAsBE;AAAK,YAAA,SAAS,EAAC,iBAAf;AAAA,oCACE;AAAQ,cAAA,SAAS,EAAC,UAAlB;AAA6B,cAAA,OAAO,EAAEnB,CAAC,IAAIR,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBADF,eAIE;AAAQ,cAAA,SAAS,EAAC,WAAlB;AAA8B,cAAA,IAAI,EAAC,QAAnC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAJF;AAAA;AAAA;AAAA;AAAA;AAAA,kBAtBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAwCD,CArHD;;GAAMD,mB;UAC4BF,W;;;KAD5BE,mB;AAuHN,eAAeA,mBAAf"
,
"sourcesContent"
:[
"import React, { useState, useEffect } from 'react'
\r\n
import
\"
./UpdateUserDataModal.css
\"\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import config from '../../../config';
\r\n\r\n
const UpdateUserDataModal = ({ removeModal }) => {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n
const accessToken = oktaAuth.getAccessToken();
\r\n\r\n
const stopProp = e => {
\r\n
e.stopPropagation()
\r\n
}
\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
useEffect(() => {
\r\n
userInfo && (
\r\n
setFirstname(userInfo.given_name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setLastname(userInfo.family_name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setUsername(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n
const [firstname, setFirstname] = useState('')
\r\n
const [lastname, setLastname] = useState('')
\r\n
const [username, setUsername] = useState('');
\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 handleUsernameChange = (e) => {
\r\n
setUsername(e.target.value);
\r\n
};
\r\n\r\n
const userInputData = JSON.stringify({
\r\n
firstname: `${firstname}`,
\r\n
lastname: `${lastname}`,
\r\n
email: `${username}`
\r\n
})
\r\n\r\n
const updateUserDataRequestOptions = {
\r\n
method: 'PUT',
\r\n
body: userInputData
\r\n
};
\r\n\r\n
const handleUpdateUserDataFormSubmit = (e) => {
\r\n
e.preventDefault();
\r\n\r\n
fetch(config.serviceAPI.updateUserDataURL, updateUserDataRequestOptions)
\r\n
.then((res) => {
\r\n
if (!res.ok) {
\r\n
window.alert(
\"
Error
\"
)
\r\n
Promise.reject(
\"\"
)
\r\n
return
\r\n
}
\r\n
if (res.ok) {
\r\n
removeModal()
\r\n
}
\r\n
})
\r\n
}
\r\n\r\n
return (
\r\n
<div className=
\"
modal-content
\"
>
\r\n
<div className=
\"
updateUserDataModal
\"
>
\r\n
<h2>Update information</h2>
\r\n
<div userDataSubmitForm>
\r\n
<form onSubmit={handleUpdateUserDataFormSubmit}>
\r\n
<label>
\r\n
First name:
\r\n
<input
\r\n
id=
\"
firstname
\"
type=
\"
text
\"\r\n
value={firstname}
\r\n
onChange={handlefirstnameChange} />
\r\n
</label>
\r\n
<label>
\r\n
Last Name:
\r\n
<input
\r\n
id=
\"
lastname
\"
type=
\"
text
\"\r\n
value={lastname}
\r\n
onChange={handlelastnameChange} />
\r\n
</label>
\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
<div className=
\"
buttonContainer
\"
>
\r\n
<button className=
\"
noButton
\"
onClick={e => removeModal()}>
\r\n
Cancel
\r\n
</button>
\r\n
<button className=
\"
yesButton
\"
type=
\"
submit
\"
>
\r\n
Update
\r\n
</button>
\r\n
</div>
\r\n
</form>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default UpdateUserDataModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/814e8bf92aa6dcd14fc8478f952d4198.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useEffect, useState } from 'react';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import
\"
./ConfirmRemoveAccountModal.css
\"
;
\n
import config from '../../../config';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const accessToken = oktaAuth.getAccessToken();
\n\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\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 removeAccountRequestOptions = {
\n
method: 'DELETE',
\n
headers: {
\n
Authorization: `Bearer ${accessToken}`
\n
},
\n
body: JSON.stringify({
\n
email: `${userInfo && userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(removeAccountRequestOptions.body);
\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions).then(res => {
\n
if (!res.ok) {
\n
console.log(res);
\n
window.alert(
\"
Error
\"
);
\n
Promise.reject(
\"\"
);
\n
return;
\n
}
\n\n
if (res.ok) {
\n
oktaAuth.signOut();
\n
}
\n
});
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
confirmRemoveAccountModal
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Are you sure you want to delete your account?
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 58,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
buttonContainer
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
noButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
No
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
onClick: handleRemoveAccount,
\n
children: [
\"
Yes
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
arrow-right
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 67,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 65,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(ConfirmRemoveAccountModal,
\"
/7FunoA1ejJNU8uKGTy1GZFqU2I=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = ConfirmRemoveAccountModal;
\n
export default ConfirmRemoveAccountModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
ConfirmRemoveAccountModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"accessToken"
,
"getAccessToken"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"headers"
,
"Authorization"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
,
"fetch"
,
"serviceAPI"
,
"removeAccountURL"
,
"res"
,
"ok"
,
"window"
,
"alert"
,
"Promise"
,
"reject"
,
"signOut"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAA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Cb,2BAArC,CAAL,CACGF,IADH,CACSgB,GAAD,IAAS;AACb,UAAI,CAACA,GAAG,CAACC,EAAT,EAAa;AACXN,QAAAA,OAAO,CAACC,GAAR,CAAYI,GAAZ;AACAE,QAAAA,MAAM,CAACC,KAAP,CAAa,OAAb;AACAC,QAAAA,OAAO,CAACC,MAAR,CAAe,EAAf;AACA;AACD;;AACD,UAAIL,GAAG,CAACC,EAAR,EAAY;AACV3B,QAAAA,QAAQ,CAACgC,OAAT;AACD;AACF,KAXH;AAYD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,eAAf;AAAA,2BACE;AAAK,MAAA,SAAS,EAAC,2BAAf;AAAA,8BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAFF,eAKE;AAAK,QAAA,SAAS,EAAC,iBAAf;AAAA,gCACE;AAAQ,UAAA,SAAS,EAAC,UAAlB;AAA6B,UAAA,OAAO,EAAE1B,CAAC,IAAIV,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;AAA8B,UAAA,OAAO,EAAEwB,mBAAvC;AAAA,6CAEE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,gBAJF;AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAmBD,CAnED;;GAAMzB,yB;UAC4BF,W;;;KAD5BE,yB;AAqEN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React, { useEffect, useState } from 'react'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import
\"
./ConfirmRemoveAccountModal.css
\"\r\n
import config from '../../../config';
\r\n\r\n
const ConfirmRemoveAccountModal = ({ removeModal, headerMessage, bodyMessage }) => {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n
const accessToken = oktaAuth.getAccessToken();
\r\n\r\n
const stopProp = e => {
\r\n
e.stopPropagation()
\r\n
}
\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 removeAccountRequestOptions = {
\r\n
method: 'DELETE',
\r\n
headers: {
\r\n
Authorization: `Bearer ${accessToken}`,
\r\n
},
\r\n
body: JSON.stringify(
\r\n
{
\r\n
email: `${userInfo && userInfo.email}`,
\r\n
}
\r\n
)
\r\n
}
\r\n\r\n
const handleRemoveAccount = () => {
\r\n
console.log(removeAccountRequestOptions.body)
\r\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\r\n
.then((res) => {
\r\n
if (!res.ok) {
\r\n
console.log(res)
\r\n
window.alert(
\"
Error
\"
)
\r\n
Promise.reject(
\"\"
)
\r\n
return
\r\n
}
\r\n
if (res.ok) {
\r\n
oktaAuth.signOut()
\r\n
}
\r\n
})
\r\n
}
\r\n\r\n
return (
\r\n
<div className=
\"
modal-content
\"
>
\r\n
<div className=
\"
confirmRemoveAccountModal
\"
>
\r\n
<h2>Delete account</h2>
\r\n
<label>
\r\n
Are you sure you want to delete your account?
\r\n
</label>
\r\n
<div className=
\"
buttonContainer
\"
>
\r\n
<button className=
\"
noButton
\"
onClick={e => removeModal()}>
\r\n
No
\r\n
</button>
\r\n
<button className=
\"
yesButton
\"
onClick={handleRemoveAccount}>
\r\n
Yes
\r\n
<FontAwesomeIcon icon=
\"
arrow-right
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default ConfirmRemoveAccountModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/8559c3f8731a5fab233da5ae104f6a46.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
removeAccount
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useEffect, useState } from 'react';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import
\"
./ConfirmRemoveAccountModal.css
\"
;
\n
import config from '../../../config';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const accessToken = oktaAuth.getAccessToken();
\n\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\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 removeAccountRequestOptions = {
\n
method: 'DELETE',
\n
headers: {
\n
Authorization: `Bearer ${accessToken}`
\n
},
\n
body: JSON.stringify({
\n
email: `${userInfo && userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(removeAccountRequestOptions.body);
\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions).then(res => {
\n
if (!res.ok) {
\n
console.log(res);
\n
window.alert(
\"
Error
\"
);
\n
Promise.reject(
\"\"
);
\n
return;
\n
}
\n\n
if (res.ok) {
\n
oktaAuth.signOut();
\n
}
\n
});
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
confirmRemoveAccountModal
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Are you sure you want to delete your account?
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 58,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
buttonContainer
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
noButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
No
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
onClick: handleRemoveAccount,
\n
children:
\"
Yes
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 65,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(ConfirmRemoveAccountModal,
\"
/7FunoA1ejJNU8uKGTy1GZFqU2I=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = ConfirmRemoveAccountModal;
\n
export default ConfirmRemoveAccountModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
ConfirmRemoveAccountModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/removeAccount/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"accessToken"
,
"getAccessToken"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"headers"
,
"Authorization"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
,
"fetch"
,
"serviceAPI"
,
"removeAccountURL"
,
"res"
,
"ok"
,
"window"
,
"alert"
,
"Promise"
,
"reject"
,
"signOut"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;AACA,OAAOC,MAAP,MAAmB,iBAAnB;;;AAEA,MAAMC,yBAAyB,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AAAA;;AACjF,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BP,WAAW,EAA3C;AACA,QAAM,CAACQ,QAAD,EAAWC,WAAX,IAA0BV,QAAQ,CAAC,IAAD,CAAxC;AACA,QAAMW,WAAW,GAAGH,QAAQ,CAACI,cAAT,EAApB;;AAEA,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpB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AC,2BAAf;AAAA,8BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAFF,eAKE;AAAK,QAAA,SAAS,EAAC,iBAAf;AAAA,gCACE;AAAQ,UAAA,SAAS,EAAC,UAAlB;AAA6B,UAAA,OAAO,EAAE1B,CAAC,IAAIV,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;AAA8B,UAAA,OAAO,EAAEwB,mBAAvC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAJF;AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAkBD,CAlED;;GAAMzB,yB;UAC4BF,W;;;KAD5BE,yB;AAoEN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React, { useEffect, useState } from 'react'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import
\"
./ConfirmRemoveAccountModal.css
\"\r\n
import config from '../../../config';
\r\n\r\n
const ConfirmRemoveAccountModal = ({ removeModal, headerMessage, bodyMessage }) => {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n
const accessToken = oktaAuth.getAccessToken();
\r\n\r\n
const stopProp = e => {
\r\n
e.stopPropagation()
\r\n
}
\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 removeAccountRequestOptions = {
\r\n
method: 'DELETE',
\r\n
headers: {
\r\n
Authorization: `Bearer ${accessToken}`,
\r\n
},
\r\n
body: JSON.stringify(
\r\n
{
\r\n
email: `${userInfo && userInfo.email}`,
\r\n
}
\r\n
)
\r\n
}
\r\n\r\n
const handleRemoveAccount = () => {
\r\n
console.log(removeAccountRequestOptions.body)
\r\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\r\n
.then((res) => {
\r\n
if (!res.ok) {
\r\n
console.log(res)
\r\n
window.alert(
\"
Error
\"
)
\r\n
Promise.reject(
\"\"
)
\r\n
return
\r\n
}
\r\n
if (res.ok) {
\r\n
oktaAuth.signOut()
\r\n
}
\r\n
})
\r\n
}
\r\n\r\n
return (
\r\n
<div className=
\"
modal-content
\"
>
\r\n
<div className=
\"
confirmRemoveAccountModal
\"
>
\r\n
<h2>Delete account</h2>
\r\n
<label>
\r\n
Are you sure you want to delete your account?
\r\n
</label>
\r\n
<div className=
\"
buttonContainer
\"
>
\r\n
<button className=
\"
noButton
\"
onClick={e => removeModal()}>
\r\n
No
\r\n
</button>
\r\n
<button className=
\"
yesButton
\"
onClick={handleRemoveAccount}>
\r\n
Yes
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default ConfirmRemoveAccountModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/8ea6114fbda19e1e9ca082930b3c8400.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
Account.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
// rfce
\n
import React, { useState, useEffect } from 'react';
\n
import
\"
./Account.css
\"
;
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"
;
\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function Account() {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const [name, setName] = useState('');
\n
const [email, setEmail] = useState('');
\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false);
\n\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState);
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
useEffect(() => {
\n
if (!authState.isAuthenticated) {
\n
// When user isn't authenticated, forget any user info
\n
setUserInfo(null);
\n
} else if (authState.isAuthenticated && updateUserDataModalState == false) {
\n
oktaAuth.getUser().then(info => {
\n
setUserInfo(info);
\n
});
\n
}
\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\n\n
useEffect(() => {
\n
userInfo && setName(userInfo.name);
\n
userInfo && setEmail(userInfo.email);
\n
}, [userInfo]);
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
page-content-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content-header
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
className:
\"
welcome-text
\"
,
\n
children:
\"
Account information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 48,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 47,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
accountpage-content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
personal-information-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
user-circle
\"
,
\n
className:
\"
user-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Personal information
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleUpdateUserDataModalState,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
pen
\"
,
\n
className:
\"
pen-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 15
\n
}, this),
\"
Edit
\"
]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 53,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Name:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 64,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? name :
\"
Fetching name
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 66,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
b
\"
, {
\n
children:
\"
Email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 70,
\n
columnNumber: 17
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 69,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children: userInfo ? email :
\"
Fetching email
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 72,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 13
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(ChangePassword, {}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 79,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 50,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(UpdateUserDataModal, {
\n
removeModal: () => setUpdateUserDataModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 83,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 82,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 46,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(Account,
\"
mspcEj1apxAoqwV3paiS9+TXXfg=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = Account;
\n
export default Account;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
Account
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/Account.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useEffect"
,
"FontAwesomeIcon"
,
"useOktaAuth"
,
"ConfirmRemoveAccountModal"
,
"UpdateUserDataModal"
,
"ChangePassword"
,
"Account"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"name"
,
"setName"
,
"email"
,
"setEmail"
,
"updateUserDataModalState"
,
"setUpdateUserDataModalState"
,
"toggleUpdateUserDataModalState"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"toggleConfirmAccountRemoveModalState"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA;AACA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAO,eAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAOC,yBAAP,MAAsC,uDAAtC;AACA,OAAOC,mBAAP,MAAgC,sCAAhC;AACA,OAAOC,cAAP,MAA2B,gDAA3B;;;AAEA,SAASC,OAAT,GAAmB;AAAA;;AACjB,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BN,WAAW,EAA3C;AACA,QAAM,CAACO,QAAD,EAAWC,WAAX,IAA0BX,QAAQ,CAAC,IAAD,CAAxC;AAEA,QAAM,CAACY,IAAD,EAAOC,OAAP,IAAkBb,QAAQ,CAAC,EAAD,CAAhC;AACA,QAAM,CAACc,KAAD,EAAQC,QAAR,IAAoBf,QAAQ,CAAC,EAAD,CAAlC;AAEA,QAAM,CAACgB,wBAAD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0CD;;GA7EQV,O;UACyBJ,W;;;KADzBI,O;AA+ET,eAAeA,OAAf"
,
"sourcesContent"
:[
"// rfce
\r\n
import React, { useState, useEffect } from 'react'
\r\n
import
\"
./Account.css
\"\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import ConfirmRemoveAccountModal from
\"
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
\"\r\n
import UpdateUserDataModal from './updateUserData/UpdateUserDataModal';
\r\n
import ChangePassword from '../../components/changePassword/ChangePassword';
\r\n\r\n
function Account() {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n\r\n
const [name, setName] = useState('')
\r\n
const [email, setEmail] = useState('');
\r\n\r\n
const [updateUserDataModalState, setUpdateUserDataModalState] = useState(false)
\r\n
const toggleUpdateUserDataModalState = () => setUpdateUserDataModalState(!updateUserDataModalState)
\r\n\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\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 if (authState.isAuthenticated && updateUserDataModalState == false) {
\r\n
oktaAuth.getUser().then(info => {
\r\n
setUserInfo(info);
\r\n
});
\r\n
}
\r\n
}, [authState, oktaAuth, updateUserDataModalState]); // Update if authState changes
\r\n\r\n
useEffect(() => {
\r\n
userInfo && (
\r\n
setName(userInfo.name)
\r\n
)
\r\n\r\n
userInfo && (
\r\n
setEmail(userInfo.email)
\r\n
)
\r\n
}, [userInfo])
\r\n\r\n\r\n
return (
\r\n
<div className=
\"
page-content-container
\"
>
\r\n
<div className=
\"
content-header
\"
>
\r\n
<h2 className=
\"
welcome-text
\"
>Account information</h2>
\r\n
</div>
\r\n
<div className=
\"
accountpage-content
\"
>
\r\n\r\n
<div className=
\"
personal-information-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
user-circle
\"
className=
\"
user-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Personal information</h5>
\r\n
<button onClick={toggleUpdateUserDataModalState}>
\r\n
<FontAwesomeIcon icon=
\"
pen
\"
className=
\"
pen-icon
\"
></FontAwesomeIcon>
\r\n
Edit
\r\n
</button>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<ul>
\r\n
<li>
\r\n
<b>Name:</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? name :
\"
Fetching name
\"
}
\r\n
</li>
\r\n
<li>
\r\n
<b>Email</b>
\r\n
</li>
\r\n
<li>
\r\n
{userInfo ? email :
\"
Fetching email
\"
}
\r\n
</li>
\r\n
</ul>
\r\n
</div>
\r\n
</div>
\r\n\r\n
<ChangePassword />
\r\n\r\n
</div>
\r\n
<div className={`modal ${updateUserDataModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<UpdateUserDataModal removeModal={() => setUpdateUserDataModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default Account
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/97ec53b1ea7d2b504fc01e2efd78fa24.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
changePassword
\\\\
ChangePassword.js
\"
;
\n
import React from 'react';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ChangePassword = () => {
\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
change-password-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
lock
\"
,
\n
className:
\"
lock-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 8,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Change password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 9,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 7,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Password requirements:
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
ul
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
At least 8 characters
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 14,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
No parts of username may be included
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 17,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
li
\"
, {
\n
children:
\"
Your password cannot be any of the last 4 passwords
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 20,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 13,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
form
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
reset-password-form-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Old password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 27,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 30,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 26,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
New password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 33,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 36,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 32,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Confirm new password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 39,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
type:
\"
password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 42,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 38,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
form-item
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
passwordResetSubmitButton
\"
,
\n
type:
\"
submit
\"
,
\n
children: [
\"
Submit
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
arrow-right
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 47,
\n
columnNumber: 17
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 45,
\n
columnNumber: 15
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 44,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 25,
\n
columnNumber: 11
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 24,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 11,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 6,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_c = ChangePassword;
\n
export default ChangePassword;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
ChangePassword
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/changePassword/ChangePassword.js"
],
"names"
:[
"React"
,
"FontAwesomeIcon"
,
"ChangePassword"
],
"mappings"
:
";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAC3B,sBACE;AAAK,IAAA,SAAS,EAAC,2BAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,8BACE,QAAC,eAAD;AA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AC,eAAD;AAAiB,gBAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,sBAFF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,kBAnBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAbF;AAAA;AAAA;AAAA;AAAA;AAAA,YALF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAkDD,CAnDD;;KAAMA,c;AAqDN,eAAeA,cAAf"
,
"sourcesContent"
:[
"import React from 'react'
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n\r\n
const ChangePassword = () => {
\r\n
return (
\r\n
<div className=
\"
change-password-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
lock
\"
className=
\"
lock-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Change password</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>Password requirements:</p>
\r\n
<ul>
\r\n
<li>
\r\n
At least 8 characters
\r\n
</li>
\r\n
<li>
\r\n
No parts of username may be included
\r\n
</li>
\r\n
<li>
\r\n
Your password cannot be any of the last 4 passwords
\r\n
</li>
\r\n
</ul>
\r\n
<form>
\r\n
<div className=
\"
reset-password-form-container
\"
>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
Old password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
New password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<label>
\r\n
Confirm new password
\r\n
</label>
\r\n
<input type=
\"
password
\"
></input>
\r\n
</div>
\r\n
<div className=
\"
form-item
\"
>
\r\n
<button className=
\"
passwordResetSubmitButton
\"
type=
\"
submit
\"
>
\r\n
Submit
\r\n
<FontAwesomeIcon icon=
\"
arrow-right
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</form>
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default ChangePassword
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/a1feae3f443b2521c3f6654dbbda3329.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
removeAccount
\\\\
RemoveAccount.js
\"
,
\n
_s = $RefreshSig$();
\n\n
import React from 'react';
\n
import ConfirmRemoveAccountModal from '../../pages/account/confirmRemoveAccountModal/ConfirmRemoveAccountModal';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function RemoveAccount() {
\n
_s();
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
deactivate-account-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
trash
\"
,
\n
className:
\"
trash-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 13,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 11,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Your account and all your data will be permanently deleted
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 16,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleConfirmAccountRemoveModalState,
\n
children:
\"
Delete
\\
xA0
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 19,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 15,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setConfirmAccountRemoveModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 24,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 23,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(RemoveAccount,
\"
XKJA7Na5EjeRgSbWm6h1M3CFd/k=
\"
);
\n\n
_c = RemoveAccount;
\n
export default RemoveAccount;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
RemoveAccount
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/removeAccount/RemoveAccount.js"
],
"names"
:[
"React"
,
"ConfirmRemoveAccountModal"
,
"FontAwesomeIcon"
,
"RemoveAccount"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"useState"
,
"toggleConfirmAccountRemoveModalState"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,yBAAP,MAAsC,yEAAtC;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,SAASC,aAAT,GAAyB;AAAA;;AACvB,QAAM,CAACC,8BAAD,EAAiCC,iCAAjC,IAAsEC,QAAQ,CAAC,KAAD,CAApF;;AACA,QAAMC,oCAAoC,GAAG,MAAMF,iCAAiC,CAAC,CAACD,8BAAF,CAApF;;AAEA,sBACE;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,8BACE,QAAC,eAAD;AAAiB,QAAA,IAAI,EAAC,OAAtB;AAA8B,QAAA,SAAS,EAAC;AAAxC;AAAA;AAAA;AAAA;AAAA,cADF,eAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAKE;AAAK,MAAA,SAAS,EAAC,SAAf;AAAA,8BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAIE;AAAQ,QAAA,OAAO,EAAEG,oCAAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAJF;AAAA;AAAA;AAAA;AAAA;AAAA,YALF,eAaE;AAAK,MAAA,SAAS,EAAG,SAAQH,8BAA8B,GAAG,QAAH,GAAc,UAAW,EAAhF;AAAA,6BACE,QAAC,yBAAD;AAA2B,QAAA,WAAW,EAAE,MAAMC,iCAAiC,CAAC,KAAD;AAA/E;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAbF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAmBD;;GAvBQF,a;;KAAAA,a;AAyBT,eAAeA,aAAf"
,
"sourcesContent"
:[
"import React from 'react'
\r\n
import ConfirmRemoveAccountModal from '../../pages/account/confirmRemoveAccountModal/ConfirmRemoveAccountModal'
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n\r\n
function RemoveAccount() {
\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\r\n\r\n
return (
\r\n
<div className=
\"
deactivate-account-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
trash
\"
className=
\"
trash-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Delete account</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>
\r\n
Your account and all your data will be permanently deleted
\r\n
</p>
\r\n
<button onClick={toggleConfirmAccountRemoveModalState}>
\r\n
Delete
\r\n
</button>
\r\n
</div>
\r\n
<div className={`modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<ConfirmRemoveAccountModal removeModal={() => setConfirmAccountRemoveModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default RemoveAccount
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/aab25e542b0a7e7480174d3d8c447e25.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useEffect, useState } from 'react';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import
\"
./ConfirmRemoveAccountModal.css
\"
;
\n
import config from '../../../config';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const accessToken = oktaAuth.getAccessToken();
\n\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\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 removeAccountRequestOptions = {
\n
method: 'DELETE',
\n
headers: {
\n
Authorization: `Bearer ${accessToken}`
\n
},
\n
body: JSON.stringify({
\n
email: `${userInfo && userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(removeAccountRequestOptions.body);
\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions).then(res => {
\n
if (!res.ok) {
\n
console.log(res);
\n
window.alert(
\"
Error
\"
);
\n
Promise.reject(
\"\"
);
\n
return;
\n
}
\n\n
if (res.ok) {
\n
oktaAuth.signOut();
\n
}
\n
});
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
confirmRemoveAccountModal
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 58,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Are you sure you want to delete your account?
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 59,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
buttonContainer
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
noButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
No
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
onClick: handleRemoveAccount,
\n
children: [
\"
Yes
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
exclamation-triangle
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 68,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 66,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(ConfirmRemoveAccountModal,
\"
/7FunoA1ejJNU8uKGTy1GZFqU2I=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = ConfirmRemoveAccountModal;
\n
export default ConfirmRemoveAccountModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
ConfirmRemoveAccountModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"FontAwesomeIcon"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"accessToken"
,
"getAccessToken"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"headers"
,
"Authorization"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
,
"fetch"
,
"serviceAPI"
,
"removeAccountURL"
,
"res"
,
"ok"
,
"window"
,
"alert"
,
"Promise"
,
"reject"
,
"signOut"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,yBAAyB,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AAAA;;AACjF,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BR,WAAW,EAA3C;AACA,QAAM,CAACS,QAAD,EAAWC,WAAX,IAA0BX,QAAQ,CAAC,IAAD,CAAxC;AACA,QAAMY,WAAW,GAAGH,QAAQ,CAACI,cAAT,EAApB;;AAEA,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIAjB,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACS,SAAS,CAACS,eAAf,EAAgC;AAC9B;AACAN,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACS,OAAT,GAAmBC,IAAnB,CAAwBC,IAAI,IAAI;AAC9BT,QAAAA,WAAW,CAACS,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,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C,WAAlB;AAA8B,UAAA,OAAO,EAAEwB,mBAAvC;AAAA,6CAEE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,gBAJF;AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAmBD,CAnED;;GAAMzB,yB;UAC4BH,W;;;KAD5BG,yB;AAqEN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React, { useEffect, useState } from 'react'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import
\"
./ConfirmRemoveAccountModal.css
\"\r\n
import config from '../../../config';
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\r\n\r\n
const ConfirmRemoveAccountModal = ({ removeModal, headerMessage, bodyMessage }) => {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n
const accessToken = oktaAuth.getAccessToken();
\r\n\r\n
const stopProp = e => {
\r\n
e.stopPropagation()
\r\n
}
\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 removeAccountRequestOptions = {
\r\n
method: 'DELETE',
\r\n
headers: {
\r\n
Authorization: `Bearer ${accessToken}`,
\r\n
},
\r\n
body: JSON.stringify(
\r\n
{
\r\n
email: `${userInfo && userInfo.email}`,
\r\n
}
\r\n
)
\r\n
}
\r\n\r\n
const handleRemoveAccount = () => {
\r\n
console.log(removeAccountRequestOptions.body)
\r\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\r\n
.then((res) => {
\r\n
if (!res.ok) {
\r\n
console.log(res)
\r\n
window.alert(
\"
Error
\"
)
\r\n
Promise.reject(
\"\"
)
\r\n
return
\r\n
}
\r\n
if (res.ok) {
\r\n
oktaAuth.signOut()
\r\n
}
\r\n
})
\r\n
}
\r\n\r\n
return (
\r\n
<div className=
\"
modal-content
\"
>
\r\n
<div className=
\"
confirmRemoveAccountModal
\"
>
\r\n
<h2>Delete account</h2>
\r\n
<label>
\r\n
Are you sure you want to delete your account?
\r\n
</label>
\r\n
<div className=
\"
buttonContainer
\"
>
\r\n
<button className=
\"
noButton
\"
onClick={e => removeModal()}>
\r\n
No
\r\n
</button>
\r\n
<button className=
\"
yesButton
\"
onClick={handleRemoveAccount}>
\r\n
Yes
\r\n
<FontAwesomeIcon icon=
\"
exclamation-triangle
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default ConfirmRemoveAccountModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/c07abb328d06ad5235a32a99faad7856.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
account
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useEffect, useState } from 'react';
\n
import { useOktaAuth } from '@okta/okta-react';
\n
import
\"
./ConfirmRemoveAccountModal.css
\"
;
\n
import config from '../../../config';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
_s();
\n\n
const {
\n
authState,
\n
oktaAuth
\n
} = useOktaAuth();
\n
const [userInfo, setUserInfo] = useState(null);
\n
const accessToken = oktaAuth.getAccessToken();
\n\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\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 removeAccountRequestOptions = {
\n
method: 'DELETE',
\n
headers: {
\n
Authorization: `Bearer ${accessToken}`
\n
},
\n
body: JSON.stringify({
\n
email: `${userInfo && userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(removeAccountRequestOptions.body);
\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions).then(res => {
\n
if (!res.ok) {
\n
console.log(res);
\n
window.alert(
\"
Error
\"
);
\n
Promise.reject(
\"\"
);
\n
return;
\n
}
\n\n
if (res.ok) {
\n
oktaAuth.signOut();
\n
}
\n
});
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
confirmRemoveAccountModal
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 58,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
Are you sure you want to delete your account?
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 59,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
buttonContainer
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
noButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
No
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 63,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
onClick: handleRemoveAccount,
\n
children: [
\"
Yes
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
arrow-right
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 68,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 66,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 62,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 56,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(ConfirmRemoveAccountModal,
\"
/7FunoA1ejJNU8uKGTy1GZFqU2I=
\"
, false, function () {
\n
return [useOktaAuth];
\n
});
\n\n
_c = ConfirmRemoveAccountModal;
\n
export default ConfirmRemoveAccountModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
ConfirmRemoveAccountModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/account/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"FontAwesomeIcon"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"accessToken"
,
"getAccessToken"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"headers"
,
"Authorization"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
,
"fetch"
,
"serviceAPI"
,
"removeAccountURL"
,
"res"
,
"ok"
,
"window"
,
"alert"
,
"Promise"
,
"reject"
,
"signOut"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,yBAAyB,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AAAA;;AACjF,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA0BR,WAAW,EAA3C;AACA,QAAM,CAACS,QAAD,EAAWC,WAAX,IAA0BX,QAAQ,CAAC,IAAD,CAAxC;AACA,QAAMY,WAAW,GAAGH,QAAQ,CAACI,cAAT,EAApB;;AAEA,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIAjB,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACS,SAAS,CAACS,eAAf,EAAgC;AAC9B;AACAN,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACS,OAAT,GAAmBC,IAAnB,CAAwBC,IAAI,IAAI;AAC9BT,QAAAA,WAAW,CAACS,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACZ,SAAD,EAAYC,QAAZ,CATM,CAAT,CATiF,CAkBtD;;AAE3B,QAAMY,2BAA2B,GAAG;AAClCC,IAAAA,MAAM,EAAE,QAD0B;AAElCC,IAAAA,OA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;AAAA;AAAA;AAAA;AAAA;AAAA,gBAJF;AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAmBD,CAnED;;GAAMzB,yB;UAC4BH,W;;;KAD5BG,yB;AAqEN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React, { useEffect, useState } from 'react'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import
\"
./ConfirmRemoveAccountModal.css
\"\r\n
import config from '../../../config';
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\r\n\r\n
const ConfirmRemoveAccountModal = ({ removeModal, headerMessage, bodyMessage }) => {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\r\n
const accessToken = oktaAuth.getAccessToken();
\r\n\r\n
const stopProp = e => {
\r\n
e.stopPropagation()
\r\n
}
\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 removeAccountRequestOptions = {
\r\n
method: 'DELETE',
\r\n
headers: {
\r\n
Authorization: `Bearer ${accessToken}`,
\r\n
},
\r\n
body: JSON.stringify(
\r\n
{
\r\n
email: `${userInfo && userInfo.email}`,
\r\n
}
\r\n
)
\r\n
}
\r\n\r\n
const handleRemoveAccount = () => {
\r\n
console.log(removeAccountRequestOptions.body)
\r\n
fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\r\n
.then((res) => {
\r\n
if (!res.ok) {
\r\n
console.log(res)
\r\n
window.alert(
\"
Error
\"
)
\r\n
Promise.reject(
\"\"
)
\r\n
return
\r\n
}
\r\n
if (res.ok) {
\r\n
oktaAuth.signOut()
\r\n
}
\r\n
})
\r\n
}
\r\n\r\n
return (
\r\n
<div className=
\"
modal-content
\"
>
\r\n
<div className=
\"
confirmRemoveAccountModal
\"
>
\r\n
<h2>Delete account</h2>
\r\n
<label>
\r\n
Are you sure you want to delete your account?
\r\n
</label>
\r\n
<div className=
\"
buttonContainer
\"
>
\r\n
<button className=
\"
noButton
\"
onClick={e => removeModal()}>
\r\n
No
\r\n
</button>
\r\n
<button className=
\"
yesButton
\"
onClick={handleRemoveAccount}>
\r\n
Yes
\r\n
<FontAwesomeIcon icon=
\"
arrow-right
\"
></FontAwesomeIcon>
\r\n
</button>
\r\n
</div>
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default ConfirmRemoveAccountModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/d8083d176a9db3b9fcd25dcee1eb4d2a.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
removeAccount
\\\\
RemoveAccount.js
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useState } from 'react';
\n
import ConfirmRemoveAccountModal from '../../pages/account/confirmRemoveAccountModal/ConfirmRemoveAccountModal';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function RemoveAccount() {
\n
_s();
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
deactivate-account-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
trash
\"
,
\n
className:
\"
trash-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 13,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 11,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Your account and all your data will be permanently deleted
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 16,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleConfirmAccountRemoveModalState,
\n
children:
\"
Delete
\\
xA0
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 19,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 15,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setConfirmAccountRemoveModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 24,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 23,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(RemoveAccount,
\"
XKJA7Na5EjeRgSbWm6h1M3CFd/k=
\"
);
\n\n
_c = RemoveAccount;
\n
export default RemoveAccount;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
RemoveAccount
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/removeAccount/RemoveAccount.js"
],
"names"
:[
"React"
,
"useState"
,
"ConfirmRemoveAccountModal"
,
"FontAwesomeIcon"
,
"RemoveAccount"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"toggleConfirmAccountRemoveModalState"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAOC,yBAAP,MAAsC,yEAAtC;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,SAASC,aAAT,GAAyB;AAAA;;AACvB,QAAM,CAACC,8BAAD,EAAiCC,iCAAjC,IAAsEL,QAAQ,CAAC,KAAD,CAApF;;AACA,QAAMM,oCAAoC,GAAG,MAAMD,iCAAiC,CAAC,CAACD,8BAAF,CAApF;;AAEA,sBACE;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,8BACE,QAAC,eAAD;AAAiB,QAAA,IAAI,EAAC,OAAtB;AAA8B,QAAA,SAAS,EAAC;AAAxC;AAAA;AAAA;AAAA;AAAA,cADF,eAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAKE;AAAK,MAAA,SAAS,EAAC,SAAf;AAAA,8BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAIE;AAAQ,QAAA,OAAO,EAAEE,oCAAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAJF;AAAA;AAAA;AAAA;AAAA;AAAA,YALF,eAaE;AAAK,MAAA,SAAS,EAAG,SAAQF,8BAA8B,GAAG,QAAH,GAAc,UAAW,EAAhF;AAAA,6BACE,QAAC,yBAAD;AAA2B,QAAA,WAAW,EAAE,MAAMC,iCAAiC,CAAC,KAAD;AAA/E;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAbF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAmBD;;GAvBQF,a;;KAAAA,a;AAyBT,eAAeA,aAAf"
,
"sourcesContent"
:[
"import React, { useState } from 'react'
\r\n
import ConfirmRemoveAccountModal from '../../pages/account/confirmRemoveAccountModal/ConfirmRemoveAccountModal'
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n\r\n
function RemoveAccount() {
\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\r\n\r\n
return (
\r\n
<div className=
\"
deactivate-account-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
trash
\"
className=
\"
trash-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Delete account</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>
\r\n
Your account and all your data will be permanently deleted
\r\n
</p>
\r\n
<button onClick={toggleConfirmAccountRemoveModalState}>
\r\n
Delete
\r\n
</button>
\r\n
</div>
\r\n
<div className={`modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<ConfirmRemoveAccountModal removeModal={() => setConfirmAccountRemoveModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default RemoveAccount
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/f09b63e0e1bcff470450299ae881f806.json
0 → 100644
View file @
c9ac64c1
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
removeAccount
\\\\
RemoveAccount.js
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useState } from 'react';
\n
import ConfirmRemoveAccountModal from './confirmRemoveAccountModal/ConfirmRemoveAccountModal';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
function RemoveAccount() {
\n
_s();
\n\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false);
\n\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState);
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
deactivate-account-container
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
container-header
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
trash
\"
,
\n
className:
\"
trash-icon
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
h5
\"
, {
\n
children:
\"
Delete account
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 13,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 11,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
content
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
p
\"
, {
\n
children:
\"
Your account and all your data will be permanently deleted
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 16,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
onClick: toggleConfirmAccountRemoveModalState,
\n
children:
\"
Delete
\\
xA0
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 19,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 15,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setConfirmAccountRemoveModalState(false)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 24,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 23,
\n
columnNumber: 7
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 5
\n
}, this);
\n
}
\n\n
_s(RemoveAccount,
\"
XKJA7Na5EjeRgSbWm6h1M3CFd/k=
\"
);
\n\n
_c = RemoveAccount;
\n
export default RemoveAccount;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
RemoveAccount
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/removeAccount/RemoveAccount.js"
],
"names"
:[
"React"
,
"useState"
,
"ConfirmRemoveAccountModal"
,
"FontAwesomeIcon"
,
"RemoveAccount"
,
"confirmAccountRemoveModalState"
,
"setConfirmAccountRemoveModalState"
,
"toggleConfirmAccountRemoveModalState"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAOC,yBAAP,MAAsC,uDAAtC;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,SAASC,aAAT,GAAyB;AAAA;;AACvB,QAAM,CAACC,8BAAD,EAAiCC,iCAAjC,IAAsEL,QAAQ,CAAC,KAAD,CAApF;;AACA,QAAMM,oCAAoC,GAAG,MAAMD,iCAAiC,CAAC,CAACD,8BAAF,CAApF;;AAEA,sBACE;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA,4BACE;AAAK,MAAA,SAAS,EAAC,kBAAf;AAAA,8BACE,QAAC,eAAD;AAAiB,QAAA,IAAI,EAAC,OAAtB;AAA8B,QAAA,SAAS,EAAC;AAAxC;AAAA;AAAA;AAAA;AAAA,cADF,eAEE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAKE;AAAK,MAAA,SAAS,EAAC,SAAf;AAAA,8BACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cADF,eAIE;AAAQ,QAAA,OAAO,EAAEE,oCAAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAJF;AAAA;AAAA;AAAA;AAAA;AAAA,YALF,eAaE;AAAK,MAAA,SAAS,EAAG,SAAQF,8BAA8B,GAAG,QAAH,GAAc,UAAW,EAAhF;AAAA,6BACE,QAAC,yBAAD;AAA2B,QAAA,WAAW,EAAE,MAAMC,iCAAiC,CAAC,KAAD;AAA/E;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YAbF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAmBD;;GAvBQF,a;;KAAAA,a;AAyBT,eAAeA,aAAf"
,
"sourcesContent"
:[
"import React, { useState } from 'react'
\r\n
import ConfirmRemoveAccountModal from './confirmRemoveAccountModal/ConfirmRemoveAccountModal'
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
\r\n\r\n
function RemoveAccount() {
\r\n
const [confirmAccountRemoveModalState, setConfirmAccountRemoveModalState] = useState(false)
\r\n
const toggleConfirmAccountRemoveModalState = () => setConfirmAccountRemoveModalState(!confirmAccountRemoveModalState)
\r\n\r\n
return (
\r\n
<div className=
\"
deactivate-account-container
\"
>
\r\n
<div className=
\"
container-header
\"
>
\r\n
<FontAwesomeIcon icon=
\"
trash
\"
className=
\"
trash-icon
\"
></FontAwesomeIcon>
\r\n
<h5>Delete account</h5>
\r\n
</div>
\r\n
<div className=
\"
content
\"
>
\r\n
<p>
\r\n
Your account and all your data will be permanently deleted
\r\n
</p>
\r\n
<button onClick={toggleConfirmAccountRemoveModalState}>
\r\n
Delete
\r\n
</button>
\r\n
</div>
\r\n
<div className={`modal ${confirmAccountRemoveModalState ?
\"
active
\"
:
\"
inactive
\"
}`}>
\r\n
<ConfirmRemoveAccountModal removeModal={() => setConfirmAccountRemoveModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n
)
\r\n
}
\r\n\r\n
export default RemoveAccount
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/src/components/changePassword/ChangePassword.js
0 → 100644
View file @
c9ac64c1
import
React
from
'
react
'
import
{
FontAwesomeIcon
}
from
'
@fortawesome/react-fontawesome
'
const
ChangePassword
=
()
=>
{
return
(
<
div
className
=
"
change-password-container
"
>
<
div
className
=
"
container-header
"
>
<
FontAwesomeIcon
icon
=
"
lock
"
className
=
"
lock-icon
"
><
/FontAwesomeIcon
>
<
h5
>
Change
password
<
/h5
>
<
/div
>
<
div
className
=
"
content
"
>
<
p
>
Password
requirements
:
<
/p
>
<
ul
>
<
li
>
At
least
8
characters
<
/li
>
<
li
>
No
parts
of
username
may
be
included
<
/li
>
<
li
>
Your
password
cannot
be
any
of
the
last
4
passwords
<
/li
>
<
/ul
>
<
form
>
<
div
className
=
"
reset-password-form-container
"
>
<
div
className
=
"
form-item
"
>
<
label
>
Old
password
<
/label
>
<
input
type
=
"
password
"
><
/input
>
<
/div
>
<
div
className
=
"
form-item
"
>
<
label
>
New
password
<
/label
>
<
input
type
=
"
password
"
><
/input
>
<
/div
>
<
div
className
=
"
form-item
"
>
<
label
>
Confirm
new
password
<
/label
>
<
input
type
=
"
password
"
><
/input
>
<
/div
>
<
div
className
=
"
form-item
"
>
<
button
className
=
"
passwordResetSubmitButton
"
type
=
"
submit
"
>
Submit
&
nbsp
;
<
FontAwesomeIcon
icon
=
"
arrow-right
"
><
/FontAwesomeIcon
>
<
/button
>
<
/div
>
<
/div
>
<
/form
>
<
/div
>
<
/div
>
)
}
export
default
ChangePassword
client/src/components/removeAccount/RemoveAccount.js
0 → 100644
View file @
c9ac64c1
import
React
,
{
useState
}
from
'
react
'
import
ConfirmRemoveAccountModal
from
'
./confirmRemoveAccountModal/ConfirmRemoveAccountModal
'
import
{
FontAwesomeIcon
}
from
'
@fortawesome/react-fontawesome
'
function
RemoveAccount
()
{
const
[
confirmAccountRemoveModalState
,
setConfirmAccountRemoveModalState
]
=
useState
(
false
)
const
toggleConfirmAccountRemoveModalState
=
()
=>
setConfirmAccountRemoveModalState
(
!
confirmAccountRemoveModalState
)
return
(
<
div
className
=
"
deactivate-account-container
"
>
<
div
className
=
"
container-header
"
>
<
FontAwesomeIcon
icon
=
"
trash
"
className
=
"
trash-icon
"
><
/FontAwesomeIcon
>
<
h5
>
Delete
account
<
/h5
>
<
/div
>
<
div
className
=
"
content
"
>
<
p
>
Your
account
and
all
your
data
will
be
permanently
deleted
<
/p
>
<
button
onClick
=
{
toggleConfirmAccountRemoveModalState
}
>
Delete
&
nbsp
;
<
/button
>
<
/div
>
<
div
className
=
{
`modal
${
confirmAccountRemoveModalState
?
"
active
"
:
"
inactive
"
}
`
}
>
<
ConfirmRemoveAccountModal
removeModal
=
{()
=>
setConfirmAccountRemoveModalState
(
false
)}
/
>
<
/div
>
<
/div
>
)
}
export
default
RemoveAccount
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment