1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

made settings provider

This commit is contained in:
Fedor Katurov 2022-07-28 17:16:37 +07:00
parent ec9062c5b9
commit 001bdbb196
2 changed files with 21 additions and 5 deletions

View file

@ -12,7 +12,7 @@ import { ERROR_LITERAL } from '~/constants/errors';
import { ProfileAccounts } from '~/containers/profile/ProfileAccounts';
import { usePatchUser } from '~/hooks/auth/usePatchUser';
import { useUser } from '~/hooks/auth/useUser';
import { useProfileForm } from '~/hooks/profile/useProfileForm';
import { useSettingsForm } from '~/utils/providers/SettingsProvider';
import { has } from '~/utils/ramda';
import styles from './styles.module.scss';
@ -23,7 +23,7 @@ const ProfileSettings: FC = () => {
const { user } = useUser();
const { save } = usePatchUser();
const { handleSubmit, values, errors, handleChange } = useProfileForm(
const { handleSubmit, values, errors, handleChange } = useSettingsForm(
{ ...user, password: '', newPassword: '' },
save
);