fix: renamge password fill to make sure it's not being auto-fileld

This commit is contained in:
poeti8 2020-02-15 17:17:16 +03:30
parent d3d399cee0
commit c576ac2bb9
1 changed files with 8 additions and 5 deletions

View File

@ -15,9 +15,12 @@ import Icon from "../Icon";
const SettingsDeleteAccount: FC = () => {
const [message, setMessage] = useMessage(1500);
const [loading, setLoading] = useState(false);
const [formState, { password, label }] = useFormState(null, {
withIds: true
});
const [formState, { password, label }] = useFormState<{ accpass: string }>(
null,
{
withIds: true
}
);
const onSubmit = async e => {
e.preventDefault();
@ -26,7 +29,7 @@ const SettingsDeleteAccount: FC = () => {
try {
await axios.post(
`${APIv2.Users}/delete`,
formState.values,
{ password: formState.values.accpass },
getAxiosConfig()
);
Router.push("/logout");
@ -57,7 +60,7 @@ const SettingsDeleteAccount: FC = () => {
</Text>
<RowCenterV as="form" onSubmit={onSubmit}>
<TextInput
{...password("password")}
{...password("accpass")}
placeholder="Password..."
autocomplete="off"
mr={3}