...
This commit is contained in:
1 parent
053128ca50
commit
cacc69a7d3
2 files changed
+2
-3
No files matched your search
@@ -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";
|
||||
|
||||
// ✅ Схема валидации
|
||||
|
||||
@@ -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<void>;
|
||||
@@ -60,7 +60,7 @@ const PhoneRequest: React.FC<Props> = ({ onSend }) => {
|
||||
await onSend(phone);
|
||||
} else {
|
||||
|
||||
await axios.post("/api/contact/send-phone", { phone });
|
||||
await client.post("/api/contact/send-phone", { phone });
|
||||
}
|
||||
|
||||
setSuccess(true);
|
||||
|
||||
Reference in new issue
Block a user