diff --git a/src/components/PriceLisForm/PriceLisForm.tsx b/src/components/PriceLisForm/PriceLisForm.tsx index a0837b0..183925f 100644 --- a/src/components/PriceLisForm/PriceLisForm.tsx +++ b/src/components/PriceLisForm/PriceLisForm.tsx @@ -6,7 +6,6 @@ import * as yup from "yup"; import { yupResolver } from "@hookform/resolvers/yup"; import styles from "./ModalRequestForm.module.css"; import Button from "../Button/Button"; -import axios from "axios"; import { client } from "../../api/client"; // ✅ Схема валидации diff --git a/src/features/MainPage/PhoneRequest.tsx b/src/features/MainPage/PhoneRequest.tsx index 228b614..e35ef02 100644 --- a/src/features/MainPage/PhoneRequest.tsx +++ b/src/features/MainPage/PhoneRequest.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; -import axios from "axios"; import styles from "./MainPage.module.css"; import Button from "../../components/Button/Button"; +import { client } from "../../api/client"; interface Props { onSend?: (phone: string) => Promise; @@ -60,7 +60,7 @@ const PhoneRequest: React.FC = ({ onSend }) => { await onSend(phone); } else { - await axios.post("/api/contact/send-phone", { phone }); + await client.post("/api/contact/send-phone", { phone }); } setSuccess(true);