Skip to content

Commit d7cf305

Browse files
fixes contact
1 parent 1ca46a5 commit d7cf305

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/apis/suggestions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { axios } from "@/lib/axios";
22

33
export interface CreateSuggestionPayload {
4-
title: string;
4+
name: string;
5+
// title: string;
56
message: string;
67
type: "business" | "user";
78
email?: string;

src/components/general/ContactForm.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const ContactForm = () => {
1414
const { t } = useTranslation("hero");
1515

1616
const [loading, setLoading] = React.useState(false);
17-
const [title, setTitle] = React.useState("");
17+
const [name, setName] = React.useState("");
1818
const [companyName, setCompanyName] = React.useState("");
1919
const [message, setMessage] = React.useState("");
2020
const [phone, setPhone] = React.useState<PhoneValue>({
@@ -32,7 +32,7 @@ const ContactForm = () => {
3232
setLoading(true);
3333

3434
const response = await createBusinessSuggestion({
35-
title,
35+
name,
3636
email: email || undefined,
3737
phone: phone.number ? phone.number : undefined,
3838
phone_country: phone.number ? phone.code : undefined,
@@ -50,7 +50,7 @@ const ContactForm = () => {
5050
toast.success(t("success_message"));
5151
}
5252

53-
setTitle("");
53+
setName("");
5454
setCompanyName("");
5555
setMessage("");
5656
setEmail("");
@@ -88,8 +88,8 @@ const ContactForm = () => {
8888
<input
8989
type="text"
9090
name="name"
91-
value={title}
92-
onChange={(e) => setTitle(e.target.value)}
91+
value={name}
92+
onChange={(e) => setName(e.target.value)}
9393
className="lg:w-[384px] w-full h-14 border border-[#C8C8C8] rounded-4xl px-4"
9494
placeholder={t("enter_your_name")}
9595
/>

0 commit comments

Comments
 (0)