...
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 { yupResolver } from "@hookform/resolvers/yup";
|
||||||
import styles from "./ModalRequestForm.module.css";
|
import styles from "./ModalRequestForm.module.css";
|
||||||
import Button from "../Button/Button";
|
import Button from "../Button/Button";
|
||||||
import axios from "axios";
|
|
||||||
import { client } from "../../api/client";
|
import { client } from "../../api/client";
|
||||||
|
|
||||||
// ✅ Схема валидации
|
// ✅ Схема валидации
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import axios from "axios";
|
|
||||||
import styles from "./MainPage.module.css";
|
import styles from "./MainPage.module.css";
|
||||||
import Button from "../../components/Button/Button";
|
import Button from "../../components/Button/Button";
|
||||||
|
import { client } from "../../api/client";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onSend?: (phone: string) => Promise<void>;
|
onSend?: (phone: string) => Promise<void>;
|
||||||
@@ -60,7 +60,7 @@ const PhoneRequest: React.FC<Props> = ({ onSend }) => {
|
|||||||
await onSend(phone);
|
await onSend(phone);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
await axios.post("/api/contact/send-phone", { phone });
|
await client.post("/api/contact/send-phone", { phone });
|
||||||
}
|
}
|
||||||
|
|
||||||
setSuccess(true);
|
setSuccess(true);
|
||||||
|
|||||||
Reference in new issue
Block a user