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
7f0c1ae3
Commit
7f0c1ae3
authored
Aug 30, 2021
by
Mathias Engelbrecht Pilegård
Browse files
added ability to remove account from account page
parent
a26e7d3e
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
client/node_modules/.cache/.eslintcache
View file @
7f0c1ae3
This diff is collapsed.
Click to expand it.
client/node_modules/.cache/babel-loader/022e7b6fcdf710941bac4380dcf60114.json
0 → 100644
View file @
7f0c1ae3
This diff is collapsed.
Click to expand it.
client/node_modules/.cache/babel-loader/0409448cd543d6d7da8fa22824238dda.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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\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
body: userInfo && JSON.stringify({
\n
email: `${userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(userInfo);
\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) {// 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: 56,
\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: 57,
\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: 61,
\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: 64,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
,
"fetch"
,
"serviceAPI"
,
"removeAccountURL"
,
"res"
,
"ok"
,
"window"
,
"alert"
,
"Promise"
,
"reject"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;AACA,OAAOC,MAAP,MAAmB,cAAnB;;;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,MA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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,EAAEnB,CAAC,IAAIR,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;AAA8B,UAAA,OAAO,EAAEoB,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,CAjED;;GAAMrB,yB;UAC4BF,W;;;KAD5BE,yB;AAmEN,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\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
body:
\r\n
userInfo && (
\r\n
JSON.stringify(
\r\n
{
\r\n
email: `${userInfo.email}`,
\r\n
}
\r\n
)
\r\n
)
\r\n
}
\r\n\r\n
const handleRemoveAccount = () => {
\r\n
console.log(userInfo)
\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/05ae930eb6f942f18b95238e25de5490.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
;
\n
import React from 'react';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
onClick: e => removeModal(),
\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: 11,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
You are about to delete your account. Are you sure?
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
children:
\"
Yes
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 15,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
formSubmitButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
No
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 18,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 9,
\n
columnNumber: 5
\n
}, this);
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"stopProp"
,
"e"
,
"stopPropagation"
],
"mappings"
:
";AAAA,OAAOA,KAAP,MAAkB,OAAlB;;;AAEA,MAAMC,yBAAyB,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AACjF,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIA,sBACE;AAAK,IAAA,SAAS,EAAC,eAAf;AAA+B,IAAA,OAAO,EAAED,CAAC,IAAIJ,WAAW,EAAxD;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cALF,eAQE;AAAQ,QAAA,SAAS,EAAC,kBAAlB;AAAqC,QAAA,OAAO,EAAEI,CAAC,IAAIJ,WAAW,EAA9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cARF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CArBD;;KAAMD,yB;AAuBN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React from 'react'
\r\n\r\n
const ConfirmRemoveAccountModal = ({ 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=
\"
confirmRemoveAccountModal
\"
>
\r\n
<h2>Delete account</h2>
\r\n
<label>
\r\n
You are about to delete your account. Are you sure?
\r\n
</label>
\r\n
<button>
\r\n
Yes
\r\n
</button>
\r\n
<button className=
\"
formSubmitButton
\"
onClick={e => removeModal()}>
\r\n
No
\r\n
</button>
\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/071353d3c22ad346fe05e167b8ad9e37.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
;
\n
import React from 'react';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
onClick: e => removeModal(),
\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: 11,
\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: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
children:
\"
Yes
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 15,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
noButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
No
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 18,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 9,
\n
columnNumber: 5
\n
}, this);
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"stopProp"
,
"e"
,
"stopPropagation"
],
"mappings"
:
";AAAA,OAAOA,KAAP,MAAkB,OAAlB;;;AAEA,MAAMC,yBAAyB,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AACjF,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIA,sBACE;AAAK,IAAA,SAAS,EAAC,eAAf;AAA+B,IAAA,OAAO,EAAED,CAAC,IAAIJ,WAAW,EAAxD;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;AAAQ,QAAA,SAAS,EAAC,WAAlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cALF,eAQE;AAAQ,QAAA,SAAS,EAAC,UAAlB;AAA6B,QAAA,OAAO,EAAEI,CAAC,IAAIJ,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cARF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAgBD,CArBD;;KAAMD,yB;AAuBN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React from 'react'
\r\n\r\n
const ConfirmRemoveAccountModal = ({ 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=
\"
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
<button className=
\"
yesButton
\"
>
\r\n
Yes
\r\n
</button>
\r\n
<button className=
\"
noButton
\"
onClick={e => removeModal()}>
\r\n
No
\r\n
</button>
\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/078c98c2ce37cf24e88265b28e64fb49.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
login
\\\\
passwordReset
\\\\
PasswordForgotModal.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useState, useRef, useEffect } from 'react';
\n
import config from '../../../config';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import
\"
./PasswordForgotModal.css
\"
;
\n
import MessageModal from '../../../components/messageModal/MessageModal'; // TODO : Clean up and make more like the message modal component
\n\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const PasswordForgotModal = () => {
\n
_s();
\n\n
const [forgotPasswordFormVisibilityState, setForgotPasswordFormVisibilityState] = useState(false);
\n
const forgotPasswordFormRef = useRef(null);
\n\n
const toggleForgotPasswordFormVisible = () => setForgotPasswordFormVisibilityState(!forgotPasswordFormVisibilityState);
\n\n
const [submitOkMessageModalState, setSubmitOkMessageModalState] = useState(false);
\n
const [username, setUsername] = useState('');
\n\n
const handleUsernameChange = e => {
\n
setUsername(e.target.value);
\n
};
\n\n
useEffect(() => {
\n
const pageClickEvent = e => {
\n
if (forgotPasswordFormRef.current !== null && !forgotPasswordFormRef.current.contains(e.target)) {
\n
toggleForgotPasswordFormVisible();
\n
}
\n
}; // If the item is active (ie open) then listen for clicks
\n\n\n
if (forgotPasswordFormVisibilityState) {
\n
window.addEventListener('click', pageClickEvent);
\n
}
\n\n
return () => {
\n
window.removeEventListener('click', pageClickEvent);
\n
};
\n
}, [forgotPasswordFormVisibilityState]);
\n
const userInputData = JSON.stringify({
\n
email: `${username}`
\n
});
\n
const ForgotPasswordRequestOptions = {
\n
method: 'PUT',
\n
body: userInputData
\n
};
\n\n
const handlePasswordForgot = e => {
\n
e.preventDefault();
\n
fetch(config.serviceAPI.forgotPasswordURL, ForgotPasswordRequestOptions).then(res => {
\n
if (!res.ok) {
\n
window.alert(
\"
Error: something went wrong
\"
);
\n
console.log(res);
\n
Promise.reject(
\"\"
);
\n
return;
\n
}
\n\n
if (res.ok) {
\n
toggleForgotPasswordFormVisible();
\n
setSubmitOkMessageModalState(true);
\n
}
\n
});
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
password-forgot-prompt
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
span
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
a
\"
, {
\n
onClick: toggleForgotPasswordFormVisible,
\n
children:
\"
Forgot password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 71,
\n
columnNumber: 11
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 70,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 69,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${forgotPasswordFormVisibilityState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
ref: forgotPasswordFormRef,
\n
className:
\"
modal-content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
recoverPasswordForm
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children:
\"
Recover password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 79,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
form
\"
, {
\n
onSubmit: handlePasswordForgot,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children: [
\"
Email:
\"
, /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
id:
\"
email
\"
,
\n
type:
\"
text
\"
,
\n
value: username,
\n
onChange: handleUsernameChange
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 83,
\n
columnNumber: 17
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 81,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
An email with a password recovery link will be sent if it is registered in our system
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 88,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
formSubmitButton
\"
,
\n
type:
\"
submit
\"
,
\n
children: [
\"
Submit
\\
xA0
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
arrow-right
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 93,
\n
columnNumber: 17
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 91,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 80,
\n
columnNumber: 13
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 78,
\n
columnNumber: 11
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 77,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 76,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${submitOkMessageModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(MessageModal, {
\n
removeModal: () => setSubmitOkMessageModalState(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: 68,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(PasswordForgotModal,
\"
g4WkMIawwrBahYMYonVecg/0JA0=
\"
);
\n\n
_c = PasswordForgotModal;
\n
export default PasswordForgotModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
PasswordForgotModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/login/passwordReset/PasswordForgotModal.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useRef"
,
"useEffect"
,
"config"
,
"FontAwesomeIcon"
,
"MessageModal"
,
"PasswordForgotModal"
,
"forgotPasswordFormVisibilityState"
,
"setForgotPasswordFormVisibilityState"
,
"forgotPasswordFormRef"
,
"toggleForgotPasswordFormVisible"
,
"submitOkMessageModalState"
,
"setSubmitOkMessageModalState"
,
"username"
,
"setUsername"
,
"handleUsernameChange"
,
"e"
,
"target"
,
"value"
,
"pageClickEvent"
,
"current"
,
"contains"
,
"window"
,
"addEventListener"
,
"removeEventListener"
,
"userInputData"
,
"JSON"
,
"stringify"
,
"email"
,
"ForgotPasswordRequestOptions"
,
"method"
,
"body"
,
"handlePasswordForgot"
,
"preventDefault"
,
"fetch"
,
"serviceAPI"
,
"forgotPasswordURL"
,
"then"
,
"res"
,
"ok"
,
"alert"
,
"console"
,
"log"
,
"Promise"
,
"reject"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,QAAmD,OAAnD;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAO,2BAAP;AACA,OAAOC,YAAP,MAAyB,+CAAzB,C,CAGA;;;;AACA,MAAMC,mBAAmB,GAAG,MAAM;AAAA;;AAChC,QAAM,CAACC,iCAAD,EAAoCC,oCAApC,IAA4ER,QAAQ,CAAC,KAAD,CAA1F;AACA,QAAMS,qBAAqB,GAAGR,MAAM,CAAC,IAAD,CAApC;;AACA,QAAMS,+BAA+B,GAAG,MAAMF,oCAAoC,CAAC,CAACD,iCAAF,CAAlF;;AAEA,QAAM,CAACI,yBAAD,EAA4BC,4BAA5B,IAA4DZ,QAAQ,CAAC,KAAD,CAA1E;AAEA,QAAM,CAACa,QAAD,EAAWC,WAAX,IAA0Bd,QAAQ,CAAC,EAAD,CAAxC;;AAEA,QAAMe,oBAAoB,GAAIC,CAAD,IAAO;AAClCF,IAAAA,WAAW,CAACE,CAAC,CAACC,MAAF,CAASC,KAAV,CAAX;AACD,GAFD;;AAIAhB,EAAAA,SAAS,CAAC,MAAM;AACd,UAAMiB,cAAc,GAAIH,CAAD,IAAO;AAC5B,UAAIP,qBAAqB,CAACW,OAAtB,KAAkC,IAAlC,IAA0C,CAACX,qBAAqB,CAACW,OAAtB,CAA8BC,QAA9B,CAAuCL,CAAC,CAACC,MAAzC,CAA/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Content"
:[
"import React, { useState, useRef, useEffect } from 'react'
\r\n
import config from '../../../config'
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\r\n
import
\"
./PasswordForgotModal.css
\"\r\n
import MessageModal from '../../../components/messageModal/MessageModal';
\r\n\r\n\r\n
// TODO : Clean up and make more like the message modal component
\r\n
const 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)} />
\r\n
</div>
\r\n
</div>
\r\n\r\n
)
\r\n
}
\r\n\r\n
export default PasswordForgotModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/103ad068db22b26c52f30e6ee915e8b4.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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\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
body: userInfo && JSON.stringify({
\n
email: userInfo.email
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(removeAccountRequestOptions.body); // fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\n
// .then((res) => {
\n
// if (!res.ok) {
\n
// console.log(res)
\n
// window.alert(
\"
Error
\"
)
\n
// Promise.reject(
\"\"
)
\n
// return
\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: 56,
\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: 57,
\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: 61,
\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: 64,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;AACA,OAAOC,MAAP,MAAmB,cAAnB;;;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;;AAEA,QAAMW,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIAd,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACQ,SAAS,CAACO,eAAf,EAAgC;AAC9B;AACAJ,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACO,OAAT,GAAmBC,IAAnB,CAAwBC,IAAI,IAAI;AAC9BP,QAAAA,WAAW,CAACO,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACV,SAAD,EAAYC,QAAZ,CATM,CAAT,CARiF,CAiBtD;;AAE3B,QAAMU,2BAA2B,GAAG;AAClCC,IAAAA,MAAM,EAAE,QAD0B;AAElCC,IAAAA,IAAI,EACFX,QAAQ,IACNY,IAAI,CAACC,SAAL,CACE;AACEC,MAAAA,KAAK,EAAEd,QAAQ,CAACc;AADlB,KADF;AAJ8B,GAApC;;AAYA,QAAMC,mBAAmB,GAAG,MAAM;AAChCC,IAAAA,OAAO,CAACC,GAAR,CAAYR,2BAA2B,CAACE,IAAxC,EADgC,CAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD,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,EAAER,CAAC,IAAIR,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;AAA8B,UAAA,OAAO,EAAEoB,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,CAjED;;GAAMrB,yB;UAC4BF,W;;;KAD5BE,yB;AAmEN,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\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
body:
\r\n
userInfo && (
\r\n
JSON.stringify(
\r\n
{
\r\n
email: userInfo.email,
\r\n
}
\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/1b2ff2f6cc59db40a8c6e670f5e365a4.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
pages
\\\\
login
\\\\
passwordReset
\\\\
PasswordForgotModal.jsx
\"
,
\n
_s = $RefreshSig$();
\n\n
import React, { useState, useRef, useEffect } from 'react';
\n
import config from '../../../config';
\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\n
import
\"
./PasswordForgotModal.css
\"
;
\n
import MessageModal from '../../../components/messageModal/MessageModal';
\n
import ConfirmRemoveAccountModal from '../../../components/confirmRemoveAccountModal/ConfirmRemoveAccountModal'; // TODO : Clean up and make more like the message modal component
\n\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const PasswordForgotModal = () => {
\n
_s();
\n\n
const [forgotPasswordFormVisibilityState, setForgotPasswordFormVisibilityState] = useState(false);
\n
const forgotPasswordFormRef = useRef(null);
\n\n
const toggleForgotPasswordFormVisible = () => setForgotPasswordFormVisibilityState(!forgotPasswordFormVisibilityState);
\n\n
const [submitOkMessageModalState, setSubmitOkMessageModalState] = useState(false);
\n
const [username, setUsername] = useState('');
\n\n
const handleUsernameChange = e => {
\n
setUsername(e.target.value);
\n
};
\n\n
useEffect(() => {
\n
const pageClickEvent = e => {
\n
if (forgotPasswordFormRef.current !== null && !forgotPasswordFormRef.current.contains(e.target)) {
\n
toggleForgotPasswordFormVisible();
\n
}
\n
}; // If the item is active (ie open) then listen for clicks
\n\n\n
if (forgotPasswordFormVisibilityState) {
\n
window.addEventListener('click', pageClickEvent);
\n
}
\n\n
return () => {
\n
window.removeEventListener('click', pageClickEvent);
\n
};
\n
}, [forgotPasswordFormVisibilityState]);
\n
const userInputData = JSON.stringify({
\n
email: `${username}`
\n
});
\n
const ForgotPasswordRequestOptions = {
\n
method: 'PUT',
\n
body: userInputData
\n
};
\n\n
const handlePasswordForgot = e => {
\n
e.preventDefault();
\n
fetch(config.serviceAPI.forgotPasswordURL, ForgotPasswordRequestOptions).then(res => {
\n
if (!res.ok) {
\n
window.alert(
\"
Error: something went wrong
\"
);
\n
console.log(res);
\n
Promise.reject(
\"\"
);
\n
return;
\n
}
\n\n
if (res.ok) {
\n
toggleForgotPasswordFormVisible();
\n
setSubmitOkMessageModalState(true);
\n
}
\n
});
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
children: [/*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
password-forgot-prompt
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
span
\"
, {
\n
children: /*#__PURE__*/_jsxDEV(
\"
a
\"
, {
\n
onClick: toggleForgotPasswordFormVisible,
\n
children:
\"
Forgot password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 72,
\n
columnNumber: 11
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 71,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 70,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${forgotPasswordFormVisibilityState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
ref: forgotPasswordFormRef,
\n
className:
\"
modal-content
\"
,
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
recoverPasswordForm
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children:
\"
Recover password
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 80,
\n
columnNumber: 13
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
form
\"
, {
\n
onSubmit: handlePasswordForgot,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children: [
\"
Email:
\"
, /*#__PURE__*/_jsxDEV(
\"
input
\"
, {
\n
id:
\"
email
\"
,
\n
type:
\"
text
\"
,
\n
value: username,
\n
onChange: handleUsernameChange
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 84,
\n
columnNumber: 17
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 82,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children:
\"
An email with a password recovery link will be sent if it is registered in our system
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 89,
\n
columnNumber: 15
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
formSubmitButton
\"
,
\n
type:
\"
submit
\"
,
\n
children: [
\"
Submit
\\
xA0
\\
xA0
\"
, /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {
\n
icon:
\"
arrow-right
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 94,
\n
columnNumber: 17
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 92,
\n
columnNumber: 15
\n
}, this)]
\n
}, void 0, true, {
\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)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 78,
\n
columnNumber: 9
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 77,
\n
columnNumber: 7
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className: `modal ${submitOkMessageModalState ?
\"
active
\"
:
\"
inactive
\"
}`,
\n
children: /*#__PURE__*/_jsxDEV(ConfirmRemoveAccountModal, {
\n
removeModal: () => setSubmitOkMessageModalState(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: 69,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_s(PasswordForgotModal,
\"
g4WkMIawwrBahYMYonVecg/0JA0=
\"
);
\n\n
_c = PasswordForgotModal;
\n
export default PasswordForgotModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
PasswordForgotModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/pages/login/passwordReset/PasswordForgotModal.jsx"
],
"names"
:[
"React"
,
"useState"
,
"useRef"
,
"useEffect"
,
"config"
,
"FontAwesomeIcon"
,
"MessageModal"
,
"ConfirmRemoveAccountModal"
,
"PasswordForgotModal"
,
"forgotPasswordFormVisibilityState"
,
"setForgotPasswordFormVisibilityState"
,
"forgotPasswordFormRef"
,
"toggleForgotPasswordFormVisible"
,
"submitOkMessageModalState"
,
"setSubmitOkMessageModalState"
,
"username"
,
"setUsername"
,
"handleUsernameChange"
,
"e"
,
"target"
,
"value"
,
"pageClickEvent"
,
"current"
,
"contains"
,
"window"
,
"addEventListener"
,
"removeEventListener"
,
"userInputData"
,
"JSON"
,
"stringify"
,
"email"
,
"ForgotPasswordRequestOptions"
,
"method"
,
"body"
,
"handlePasswordForgot"
,
"preventDefault"
,
"fetch"
,
"serviceAPI"
,
"forgotPasswordURL"
,
"then"
,
"res"
,
"ok"
,
"alert"
,
"console"
,
"log"
,
"Promise"
,
"reject"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,QAAmD,OAAnD;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,OAAO,2BAAP;AACA,OAAOC,YAAP,MAAyB,+CAAzB;AACA,OAAOC,yBAAP,MAAsC,yEAAtC,C,CAGA;;;;AACA,MAAMC,mBAAmB,GAAG,MAAM;AAAA;;AAChC,QAAM,CAACC,iCAAD,EAAoCC,oCAApC,IAA4ET,QAAQ,CAAC,KAAD,CAA1F;AACA,QAAMU,qBAAqB,GAAGT,MAA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AAD;AAAiB,gBAAA,IAAI,EAAC;AAAtB;AAAA;AAAA;AAAA;AAAA,sBAFF;AAAA;AAAA;AAAA;AAAA;AAAA,oBAXF;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YARF,eA+BE;AAAK,MAAA,SAAS,EAAG,SAAQJ,yBAAyB,GAAG,QAAH,GAAc,UAAW,EAA3E;AAAA,6BACE,QAAC,yBAAD;AAA2B,QAAA,WAAW,EAAE,MAAMC,4BAA4B,CAAC,KAAD;AAA1E;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YA/BF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAsCD,CAhGD;;GAAMN,mB;;KAAAA,mB;AAkGN,eAAeA,mBAAf"
,
"sourcesContent"
:[
"import React, { useState, useRef, useEffect } from 'react'
\r\n
import config from '../../../config'
\r\n
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
\r\n
import
\"
./PasswordForgotModal.css
\"\r\n
import MessageModal from '../../../components/messageModal/MessageModal';
\r\n
import ConfirmRemoveAccountModal from '../../../components/confirmRemoveAccountModal/ConfirmRemoveAccountModal';
\r\n\r\n\r\n
// TODO : Clean up and make more like the message modal component
\r\n
const 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
<ConfirmRemoveAccountModal removeModal={() => setSubmitOkMessageModalState(false)} />
\r\n
</div>
\r\n
</div>
\r\n\r\n
)
\r\n
}
\r\n\r\n
export default PasswordForgotModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/28236ae412d1d53cb3b4be2452dbda73.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
messageModal
\\\\
MessageModal.jsx
\"
;
\n
import React from 'react';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const MessageModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
onClick: e => removeModal(),
\n
children: /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
submitOkModal
\"
,
\n
children: [/*#__PURE__*/_jsxDEV(
\"
h2
\"
, {
\n
children: headerMessage
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 11,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
label
\"
, {
\n
children: bodyMessage
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
formSubmitButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
Ok
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 15,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 9,
\n
columnNumber: 5
\n
}, this);
\n
};
\n\n
_c = MessageModal;
\n
export default MessageModal;
\n\n
var _c;
\n\n
$RefreshReg$(_c,
\"
MessageModal
\"
);"
,
"map"
:{
"version"
:
3
,
"sources"
:[
"C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/messageModal/MessageModal.jsx"
],
"names"
:[
"React"
,
"MessageModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"stopProp"
,
"e"
,
"stopPropagation"
],
"mappings"
:
";AAAA,OAAOA,KAAP,MAAkB,OAAlB;;;AAEA,MAAMC,YAAY,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AACpE,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIA,sBACE;AAAK,IAAA,SAAS,EAAC,eAAf;AAA+B,IAAA,OAAO,EAAED,CAAC,IAAIJ,WAAW,EAAxD;AAAA,2BACE;AAAK,MAAA,SAAS,EAAC,eAAf;AAAA,8BACE;AAAA,kBAAKC;AAAL;AAAA;AAAA;AAAA;AAAA,cADF,eAEE;AAAA,kBACGC;AADH;AAAA;AAAA;AAAA;AAAA,cAFF,eAKE;AAAQ,QAAA,SAAS,EAAC,kBAAlB;AAAqC,QAAA,OAAO,EAAEE,CAAC,IAAIJ,WAAW,EAA9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAaD,CAlBD;;KAAMD,Y;AAoBN,eAAeA,YAAf"
,
"sourcesContent"
:[
"import React from 'react'
\r\n\r\n
const 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\n
export default MessageModal
\r\n
"
]},
"metadata"
:{},
"sourceType"
:
"module"
}
\ No newline at end of file
client/node_modules/.cache/babel-loader/29ac331f037563dd698073c558e16b31.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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 { 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\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
// const removeAccountRequestOptions = {
\n
// method: 'POST',
\n
// body:
\n
// userInfo && (
\n
// JSON.stringify(
\n
// {
\n
// email: userInfo.email
\n
// }
\n
// )
\n
// )
\n
// }
\n
// const handleRemoveAccount = () => {
\n
// fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\n
// .then((res) => {
\n
// if (!res.ok) {
\n
// window.alert(
\"
Error
\"
)
\n
// Promise.reject(
\"\"
)
\n
// return
\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: 53,
\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: 54,
\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: 58,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
children:
\"
Yes
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 61,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 51,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;;;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,MAA0BN,WAAW,EAA3C;AACA,QAAM,CAACO,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAC,IAAD,CAAxC;;AAEA,QAAMU,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIAb,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACO,SAAS,CAACO,eAAf,EAAgC;AAC9B;AACAJ,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACO,OAAT,GAAmBC,IAAnB,CAAwBC,IAAI,IAAI;AAC9BP,QAAAA,WAAW,CAACO,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACV,SAAD,EAAYC,QAAZ,CATM,CAAT,CARiF,CAiBtD;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,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,EAAEI,CAAC,IAAIR,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;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,CA/DD;;GAAMD,yB;UAC4BD,W;;;KAD5BC,yB;AAiEN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React, { useEffect, useState } from 'react'
\r\n
import { useOktaAuth } from '@okta/okta-react';
\r\n
import
\"
./ConfirmRemoveAccountModal.css
\"\r\n\r\n
const ConfirmRemoveAccountModal = ({ removeModal, headerMessage, bodyMessage }) => {
\r\n
const { authState, oktaAuth } = useOktaAuth();
\r\n
const [userInfo, setUserInfo] = useState(null);
\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: 'POST',
\r\n
// body:
\r\n
// userInfo && (
\r\n
// JSON.stringify(
\r\n
// {
\r\n
// email: userInfo.email
\r\n
// }
\r\n
// )
\r\n
// )
\r\n
// }
\r\n\r\n
// const handleRemoveAccount = () => {
\r\n
// fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\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
// // 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
\"
>
\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/2b326bb5984364a3956946da20bcaf36.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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\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
body: userInfo && JSON.stringify({
\n
email: `${userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(userInfo);
\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: 56,
\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: 57,
\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: 61,
\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: 64,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"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,cAAnB;;;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;;AAEA,QAAMW,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIAd,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACQ,SAAS,CAACO,eAAf,EAAgC;AAC9B;AACAJ,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACO,OAAT,GAAmBC,IAAnB,CAAwBC,IAAI,IAAI;AAC9BP,QAAAA,WAAW,CAACO,IAAD,CAAX;AACD,OAFD;AAGD;AACF,G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AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAkBD,CAjED;;GAAMrB,yB;UAC4BF,W;;;KAD5BE,yB;AAmEN,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\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
body:
\r\n
userInfo && (
\r\n
JSON.stringify(
\r\n
{
\r\n
email: `${userInfo.email}`,
\r\n
}
\r\n
)
\r\n
)
\r\n
}
\r\n\r\n
const handleRemoveAccount = () => {
\r\n
console.log(userInfo)
\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/2b6385627af7f68f1ad1cf88e610a315.json
0 → 100644
View file @
7f0c1ae3
This diff is collapsed.
Click to expand it.
client/node_modules/.cache/babel-loader/318ddddffa44fc005d2257cb3c72c644.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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\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
body: JSON.stringify({
\n
email: `${userInfo && userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(removeAccountRequestOptions.body); // fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\n
// .then((res) => {
\n
// if (!res.ok) {
\n
// console.log(res)
\n
// window.alert(
\"
Error
\"
)
\n
// Promise.reject(
\"\"
)
\n
// return
\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: 53,
\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: 54,
\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: 58,
\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: 61,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 51,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;AACA,OAAOC,MAAP,MAAmB,cAAnB;;;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;;AAEA,QA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AA;AAAA;AAAA;AAAA;AAAA,gBAJF;AAAA;AAAA;AAAA;AAAA;AAAA,cALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAkBD,CA9DD;;GAAMrB,yB;UAC4BF,W;;;KAD5BE,yB;AAgEN,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\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
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/3b300445647ce3ba478c29eed5d5da33.json
0 → 100644
View file @
7f0c1ae3
This diff is collapsed.
Click to expand it.
client/node_modules/.cache/babel-loader/3f952845fdb97aa37780c24793ef3301.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
;
\n
import React from 'react';
\n
import
\"
./ConfirmRemoveAccountModal.css
\"
;
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
const stopProp = e => {
\n
e.stopPropagation();
\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: 12,
\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: 13,
\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: 17,
\n
columnNumber: 11
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
children:
\"
Yes
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 20,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 16,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 11,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 5
\n
}, this);
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"stopProp"
,
"e"
,
"stopPropagation"
],
"mappings"
:
";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAO,iCAAP;;;AAEA,MAAMC,yBAAyB,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AACjF,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIA,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,EAAED,CAAC,IAAIJ,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;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,CAvBD;;KAAMD,yB;AAyBN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React from 'react'
\r\n
import
\"
./ConfirmRemoveAccountModal.css
\"\r\n\r\n
const ConfirmRemoveAccountModal = ({ 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
\"
>
\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
\"
>
\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/45305b1a2f507ab29dbe56a530762718.json
0 → 100644
View file @
7f0c1ae3
This diff is collapsed.
Click to expand it.
client/node_modules/.cache/babel-loader/4b71d58431bdc0fee1c568a3deec77c0.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
confirmRemoveAccountModal
\\\\
ConfirmRemoveAccountModal.jsx
\"
;
\n
import React from 'react';
\n
import { jsxDEV as _jsxDEV } from
\"
react/jsx-dev-runtime
\"
;
\n\n
const ConfirmRemoveAccountModal = ({
\n
removeModal,
\n
headerMessage,
\n
bodyMessage
\n
}) => {
\n
const stopProp = e => {
\n
e.stopPropagation();
\n
};
\n\n
return /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
modal-content
\"
,
\n
onClick: e => removeModal(),
\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: 11,
\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: 12,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
div
\"
, {
\n
className:
\"
buttonContainer
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 15,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
yesButton
\"
,
\n
children:
\"
Yes
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 18,
\n
columnNumber: 9
\n
}, this), /*#__PURE__*/_jsxDEV(
\"
button
\"
, {
\n
className:
\"
noButton
\"
,
\n
onClick: e => removeModal(),
\n
children:
\"
No
\"\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 21,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 10,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 9,
\n
columnNumber: 5
\n
}, this);
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"stopProp"
,
"e"
,
"stopPropagation"
],
"mappings"
:
";AAAA,OAAOA,KAAP,MAAkB,OAAlB;;;AAEA,MAAMC,yBAAyB,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AACjF,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIA,sBACE;AAAK,IAAA,SAAS,EAAC,eAAf;AAA+B,IAAA,OAAO,EAAED,CAAC,IAAIJ,WAAW,EAAxD;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;AAAf;AAAA;AAAA;AAAA;AAAA,cALF,eAQE;AAAQ,QAAA,SAAS,EAAC,WAAlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cARF,eAWE;AAAQ,QAAA,SAAS,EAAC,UAAlB;AAA6B,QAAA,OAAO,EAAEI,CAAC,IAAIJ,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAXF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAmBD,CAxBD;;KAAMD,yB;AA0BN,eAAeA,yBAAf"
,
"sourcesContent"
:[
"import React from 'react'
\r\n\r\n
const ConfirmRemoveAccountModal = ({ 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=
\"
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\r\n
</div>
\r\n
<button className=
\"
yesButton
\"
>
\r\n
Yes
\r\n
</button>
\r\n
<button className=
\"
noButton
\"
onClick={e => removeModal()}>
\r\n
No
\r\n
</button>
\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/50792d4574aa696ccefd35d83e61c1b4.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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\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
body: userInfo && JSON.stringify({
\n
email: `${userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(userInfo.email); // fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\n
// .then((res) => {
\n
// if (!res.ok) {
\n
// console.log(res)
\n
// window.alert(
\"
Error
\"
)
\n
// Promise.reject(
\"\"
)
\n
// return
\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: 56,
\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: 57,
\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: 61,
\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: 64,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"body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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD,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,EAAEX,CAAC,IAAIR,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;AAA8B,UAAA,OAAO,EAAEoB,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,CAjED;;GAAMrB,yB;UAC4BF,W;;;KAD5BE,yB;AAmEN,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\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
body:
\r\n
userInfo && (
\r\n
JSON.stringify(
\r\n
{
\r\n
email: `${userInfo.email}`,
\r\n
}
\r\n
)
\r\n
)
\r\n
}
\r\n\r\n
const handleRemoveAccount = () => {
\r\n
console.log(userInfo.email)
\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/54e2bdd9fd7832ad0ea9a0199664eea7.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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\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 userData = JSON.stringify({
\n
email:
\"
john-activates@example.com
\"\n
});
\n
const removeAccountRequestOptions = {
\n
method: 'DELETE',
\n
body: userData
\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: 53,
\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: 54,
\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: 58,
\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: 61,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 57,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 52,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 51,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"userData"
,
"JSON"
,
"stringify"
,
"email"
,
"removeAccountRequestOptions"
,
"method"
,
"body"
,
"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ACC,GAAR,CAAYL,2BAA2B,CAACE,IAAxC;AACAI,IAAAA,KAAK,CAAC1B,MAAM,CAAC2B,UAAP,CAAkBC,gBAAnB,EAAqCR,2BAArC,CAAL,CACGN,IADH,CACSe,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;AACVxB,QAAAA,QAAQ,CAAC6B,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,EAAEzB,CAAC,IAAIR,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;AAA8B,UAAA,OAAO,EAAEqB,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,CA9DD;;GAAMtB,yB;UAC4BF,W;;;KAD5BE,yB;AAgEN,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\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 userData = JSON.stringify({
\r\n
email:
\"
john-activates@example.com
\"
,
\r\n
})
\r\n\r\n
const removeAccountRequestOptions = {
\r\n
method: 'DELETE',
\r\n
body: userData
\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/5fee5038844db6012ff8403d6e1a6dd1.json
0 → 100644
View file @
7f0c1ae3
{
"ast"
:
null
,
"code"
:
"var _jsxFileName =
\"
C:
\\\\
Users
\\\\
Bruger
\\\\
Desktop
\\\\
Web-projects
\\\\
pipit
\\\\
client
\\\\
src
\\\\
components
\\\\
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\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
body: userInfo && JSON.stringify({
\n
email: `${userInfo.email}`
\n
})
\n
};
\n\n
const handleRemoveAccount = () => {
\n
console.log(removeAccountRequestOptions.body); // fetch(config.serviceAPI.removeAccountURL, removeAccountRequestOptions)
\n
// .then((res) => {
\n
// if (!res.ok) {
\n
// console.log(res)
\n
// window.alert(
\"
Error
\"
)
\n
// Promise.reject(
\"\"
)
\n
// return
\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: 56,
\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: 57,
\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: 61,
\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: 64,
\n
columnNumber: 11
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 60,
\n
columnNumber: 9
\n
}, this)]
\n
}, void 0, true, {
\n
fileName: _jsxFileName,
\n
lineNumber: 55,
\n
columnNumber: 7
\n
}, this)
\n
}, void 0, false, {
\n
fileName: _jsxFileName,
\n
lineNumber: 54,
\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/confirmRemoveAccountModal/ConfirmRemoveAccountModal.jsx"
],
"names"
:[
"React"
,
"useEffect"
,
"useState"
,
"useOktaAuth"
,
"config"
,
"ConfirmRemoveAccountModal"
,
"removeModal"
,
"headerMessage"
,
"bodyMessage"
,
"authState"
,
"oktaAuth"
,
"userInfo"
,
"setUserInfo"
,
"stopProp"
,
"e"
,
"stopPropagation"
,
"isAuthenticated"
,
"getUser"
,
"then"
,
"info"
,
"removeAccountRequestOptions"
,
"method"
,
"body"
,
"JSON"
,
"stringify"
,
"email"
,
"handleRemoveAccount"
,
"console"
,
"log"
],
"mappings"
:
";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,kBAA5B;AACA,OAAO,iCAAP;AACA,OAAOC,MAAP,MAAmB,cAAnB;;;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;;AAEA,QAAMW,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD;;AAIAd,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACQ,SAAS,CAACO,eAAf,EAAgC;AAC9B;AACAJ,MAAAA,WAAW,CAAC,IAAD,CAAX;AACD,KAHD,MAGO;AACLF,MAAAA,QAAQ,CAACO,OAAT,GAAmBC,IAAnB,CAAwBC,IAAI,IAAI;AAC9BP,QAAAA,WAAW,CAACO,IAAD,CAAX;AACD,OAFD;AAGD;AACF,GATQ,EASN,CAACV,SAAD,EAAYC,QAAZ,CATM,CAAT,CARiF,CAiBtD;;AAE3B,QAAMU,2BAA2B,GAAG;AAClCC,IAAAA,MAAM,EAAE,QAD0B;AAElCC,IAAAA,IAAI,EACFX,QAAQ,IACNY,IAAI,CAACC,SAAL,CACE;AACEC,MAAAA,KAAK,EAAG,GAAEd,QAAQ,CAACc,KAAM;AAD3B,KADF;AAJ8B,GAApC;;AAYA,QAAMC,mBAAmB,GAAG,MAAM;AAChCC,IAAAA,OAAO,CAACC,GAAR,CAAYR,2BAA2B,CAACE,IAAxC,EADgC,CAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD,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,EAAER,CAAC,IAAIR,WAAW,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,eAIE;AAAQ,UAAA,SAAS,EAAC,WAAlB;AAA8B,UAAA,OAAO,EAAEoB,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,CAjED;;GAAMrB,yB;UAC4BF,W;;;KAD5BE,yB;AAmEN,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\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
body:
\r\n
userInfo && (
\r\n
JSON.stringify(
\r\n
{
\r\n
email: `${userInfo.email}`,
\r\n
}
\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
Prev
1
2
3
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