Browse Source

update

tags/Baseline_30082024_FRONTEND_UAT
MSI\derek 1 year ago
parent
commit
78d4437c19
1 changed files with 4 additions and 10 deletions
  1. +4
    -10
      src/components/ChangePassword/ChangePasswordForm.tsx

+ 4
- 10
src/components/ChangePassword/ChangePasswordForm.tsx View File

@@ -93,11 +93,7 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) =>
} }
}); });
}; };

if (!/[-!@#$%^&=+_*(),.?":{}|<>]/.test('12')) {
console.log(!/[-!@#$%^&=+_*(),.?":{}|<>]/.test('12'))
}

const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => { const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
// Update the theme with the new color based on the input value // Update the theme with the new color based on the input value
const newInputValue = event.target.value; const newInputValue = event.target.value;
@@ -191,9 +187,7 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) =>
component: (props) => { component: (props) => {
return ( return (
<FormHelperText {...props}> <FormHelperText {...props}>
{(props.children as string[]).map((line, index) => {
console.log(index, getColorFromInput(inputValue, msgList)[index])
return (
{(props.children as string[]).map((line, index) => (
<span <span
key={index} key={index}
style={{ style={{
@@ -210,11 +204,11 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) =>
)} )}
{line} {line}
{index < {index <
(props.children as string[]).length && (
(props.children as string[]).length - 1 && (
<br /> <br />
)} )}
</span> </span>
)}
)
)} )}
</FormHelperText> </FormHelperText>
); );


Loading…
Cancel
Save