Skip to content

Instantly share code, notes, and snippets.

View jcz530's full-sized avatar

Joe Czubiak jcz530

View GitHub Profile
@jcz530
jcz530 / NetlifyContactForm.js
Last active May 4, 2020 22:37
Ant Design Netlify Contact Form Component
import React from 'react'
import { Row, Col, Button, Form, Input } from 'antd'
const { TextArea } = Input
import { UserOutlined, MailOutlined } from '@ant-design/icons'
function encode(data) {
return Object.keys(data)
.map(key => encodeURIComponent(key) + `=` + encodeURIComponent(data[key]))
.join(`&`)
}