Added tracking code form.

This commit is contained in:
Mike Cao 2020-08-07 20:36:57 -07:00
parent c4b75e4aec
commit 58a1be7a30
27 changed files with 100 additions and 42 deletions

View file

@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { Formik, Form, Field } from 'formik';
import { post } from 'lib/web';
import Button from 'components/interface/Button';
import Button from 'components/common/Button';
import FormLayout, {
FormButtons,
FormError,
@ -22,7 +22,7 @@ const validate = ({ name, domain }) => {
return errors;
};
export default function WebsiteEditForm({ initialValues, onSave, onClose }) {
export default function WebsiteEditForm({ values, onSave, onClose }) {
const [message, setMessage] = useState();
const handleSubmit = async values => {
@ -37,7 +37,7 @@ export default function WebsiteEditForm({ initialValues, onSave, onClose }) {
return (
<FormLayout>
<Formik initialValues={initialValues} validate={validate} onSubmit={handleSubmit}>
<Formik initialValues={values} validate={validate} onSubmit={handleSubmit}>
{() => (
<Form>
<FormRow>