@@ -8,33 +8,17 @@ import {notMinStrLength} from "../../../background/methods/checkInput";
8
8
9
9
export default function Profile ( ) : ReactElement {
10
10
const [ isEditing , setIsEditing ] = useState < boolean > ( false ) ;
11
- const user = useSelector ( ( state : RootState ) => state . user ) ;
12
-
13
- /*const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {
14
- event.preventDefault();
15
- let value: [string, boolean] | string = makePasswordInputFitRules(event.target.value);
16
- if (!value[1]) {
17
- value = password;
18
- } else {
19
- value = value[0]
20
- }
21
- setPasswordInformationLength(!notMinStrLength(value, MIN_PASSWORD_LENGTH));
22
- setPasswordInformationLowercase(value.match(/[a-z]/) !== null);
23
- setPasswordInformationUppercase(value.match(/[A-Z]/) !== null);
24
- setPasswordInformationNumber(value.match(/\d/) !== null);
25
- setPassword(value)
26
- }
27
-
28
- const handlePasswordConfirmationChange = async (event: ChangeEvent<HTMLInputElement>) => {
29
- event.preventDefault();
30
- let value: [string, boolean] | string = makePasswordInputFitRules(event.target.value);
31
- if (!value[1]) {
32
- value = passwordConfirmation;
33
- } else {
34
- value = value[0]
35
- }
36
- setPasswordConfirmation(value);
37
- }*/
11
+ const [ username , setUsername ] = useState < string > ( "" ) ;
12
+ const [ password , setPassword ] = useState < string > ( "" ) ;
13
+ const [ passwordConfirmation , setPasswordConfirmation ] = useState < string > ( "" ) ;
14
+ const [ passwordInformationLength , setPasswordInformationLength ] = useState < boolean > ( false ) ;
15
+ const [ passwordInformationLowercase , setPasswordInformationLowercase ] = useState < boolean > ( false ) ;
16
+ const [ passwordInformationUppercase , setPasswordInformationUppercase ] = useState < boolean > ( false ) ;
17
+ const [ passwordInformationNumber , setPasswordInformationNumber ] = useState < boolean > ( false ) ;
18
+ const [ passwordsMatch , setPasswordsMatch ] = useState < boolean > ( true ) ;
19
+ const [ alertMessage , setAlertMessage ] = useState < string > ( "Error 404: No Message found." ) ;
20
+ const [ alertVariant , setAlertColor ] = useState < "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark" > ( "success" ) ;
21
+ const [ alertVisibility , setAlertVisibility ] = useState < boolean > ( false ) ;
38
22
39
23
function handleEditModeChange ( ) : void {
40
24
if ( isEditing ) {
0 commit comments