This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useRef } from "react"; | |
import styles from "./Contact.module.css"; | |
import Container from "../Container"; | |
// Use in Netlify form to encode body data | |
function encode(data) { | |
return Object.keys(data) | |
.map((key) => encodeURIComponent(key) + "=" + encodeURIComponent(data[key])) | |
.join("&"); |