Fix change password page
This commit is contained in:
parent
813a0bbc77
commit
91b2a5024e
@ -1,10 +1,10 @@
|
||||
import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
import { apiInstance } from "@/shared/config/apiConfig";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { AxiosError } from "axios";
|
||||
import Loader from "@/shared/ui/Loader/Loader";
|
||||
import ChangePasswordInput from "./ChangePasswordInput/ChangePasswordInput";
|
||||
import { Link } from "@/shared/config/navigation";
|
||||
|
||||
interface IChangePasswordProps {
|
||||
closeWindow: (bool: boolean) => void;
|
||||
@ -79,7 +79,7 @@ const ChangePassword: React.FC<IChangePasswordProps> = ({
|
||||
setWarningConfirmNewPassword("");
|
||||
setLoader(true);
|
||||
const res = await apiInstance.patch(
|
||||
"/users/change_password/",
|
||||
"/auth/password_change/",
|
||||
data,
|
||||
config
|
||||
);
|
||||
@ -146,12 +146,12 @@ const ChangePassword: React.FC<IChangePasswordProps> = ({
|
||||
<button
|
||||
type="button"
|
||||
onClick={changePass}
|
||||
className="py-4 px-4 rounded-sm font-bold leading-6 shadow-sm border border-blue bg-blue text-white"
|
||||
className="py-3 px-4 rounded-md font-bold leading-6 shadow-sm border border-blue bg-blue text-white"
|
||||
>
|
||||
{loader ? <Loader /> : "Сохранить"}
|
||||
</button>
|
||||
<button
|
||||
className="py-4 px-4 rounded-sm font-bold leading-6 shadow-sm border border-gray-400 bg-slate-200 text-gray-500"
|
||||
className="py-3 px-4 rounded-md font-bold leading-6 shadow-md border border-gray-300 bg-slate-200 text-gray-500"
|
||||
type="button"
|
||||
onClick={() => closeWindow(false)}
|
||||
>
|
||||
|
@ -34,7 +34,7 @@ const ChangePasswordInput: React.FC<IChangePasswordInputProps> = ({
|
||||
name={name}
|
||||
placeholder={placeholder}
|
||||
type={isOpen ? "text" : "password"}
|
||||
className="w-full text-[14px] placeholder:leading-6 bg-gray-500"
|
||||
className="w-full text-[14px] placeholder:leading-6 bg-gray-200"
|
||||
/>
|
||||
<button onClick={() => setIsOpen((prev) => !prev)} type="button">
|
||||
<Image src={isOpen ? eye_on : eye_off} alt="Eye Icon" />
|
||||
|
Loading…
Reference in New Issue
Block a user