import Link from "next/link"; import style from "./footer.module.css"; import styles from "../../../pages/index.module.css"; import Image from "next/image"; import map from "../../../public/assets/photos/map.png"; import Map from "../map/index"; import { useState } from "react"; import panelAxios from "../../services/panelAxios"; import dotenv from "dotenv"; dotenv.config(); function footer({ token, data }) { const [email, setEmail] = useState(""); const [comment, setComment] = useState(""); const submitComment = async () => { if (email != "") { const raw = JSON.stringify({ // ProcessName: "ConnectToUs", // FieldValues: [ // { // Name: "Email", // Value: email, // }, // { // Name: "Comment", // Value: comment, // }, // { // Name: "submitDate", // Value: "", // }, // { // Name: "submitTime", // Value: "", // }, // ], ConnectToUs: { Email: email, Comment: comment, }, }); await panelAxios.post("api/save", raw, { headers: { Authorization: `Bearer ${token}`, }, }); setEmail(""); setComment(""); } else alert("لطفا ایمیل را وارد نمایید."); }; return ( <>
{data?.address}