Skip to content

Commit

Permalink
chore: remove react-hook-form dev tool
Browse files Browse the repository at this point in the history
this isn't removed in production builds

refs react-hook-form/devtools#175
  • Loading branch information
steveoh committed Nov 2, 2022
1 parent aff7dfd commit f14d139
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/components/pageElements/AddPoint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import { contrastColor } from 'contrast-color';
import { CirclePicker } from 'react-color';
import { Controller, useForm } from 'react-hook-form';
import { DevTool } from '@hookform/devtools';
import { useImmer } from 'use-immer';
import { httpsCallable } from 'firebase/functions';
import { useFunctions } from 'reactfire';
Expand Down Expand Up @@ -88,7 +87,6 @@ export default function AddPoint({

return (
<form onSubmit={handleSubmit(savePoint)}>
<DevTool control={control} />
<h1 className="text-2xl font-bold">Add a Point</h1>
<p className="my-3 text-sm leading-tight text-white">
Saving points are available to help you remember points of interest when
Expand Down
2 changes: 0 additions & 2 deletions src/components/pageElements/CornerSubmission/Datum.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import clsx from 'clsx';
import { Controller, useForm } from 'react-hook-form';
import { ErrorMessage } from '@hookform/error-message';
import { yupResolver } from '@hookform/resolvers/yup';
import { DevTool } from '@hookform/devtools';
import { Tab } from '@headlessui/react';
import Spacer from '../../formElements/Spacer.jsx';
import { NumberedForm, NumberedFormSection } from '../../formElements/Form.jsx';
Expand Down Expand Up @@ -131,7 +130,6 @@ const CoordinatePicker = () => {
<NumberedFormSection number={0}>
<Wizard back={() => send('BACK')} next={true} clear={onReset} />
</NumberedFormSection>
<DevTool control={control} />
</NumberedForm>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ErrorMessage } from '@hookform/error-message';
import { yupResolver } from '@hookform/resolvers/yup';
import clsx from 'clsx';
import { Controller, useForm } from 'react-hook-form';
import { DevTool } from '@hookform/devtools';
import { RadioGroup } from '@headlessui/react';
import { Input } from '../../formElements/Inputs.jsx';
import Spacer from '../../formElements/Spacer.jsx';
Expand Down Expand Up @@ -269,7 +268,6 @@ export const GeographicHeight = () => {
<Spacer className="my-4" />
<NumberedForm onSubmit={handleSubmit(onSubmit)}>
<NumberedFormSection number={4} title="Ellipsoid Height">
<DevTool control={control} />
<Input
value={defaultValues.elevation}
label={false}
Expand Down
2 changes: 0 additions & 2 deletions src/components/pageElements/CornerSubmission/Metadata.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useContext } from 'react';
import { ErrorMessage } from '@hookform/error-message';
import { yupResolver } from '@hookform/resolvers/yup';
import { DevTool } from '@hookform/devtools';
import { Controller, useForm } from 'react-hook-form';
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid';
import { SubmissionContext } from '../../contexts/SubmissionContext.jsx';
Expand Down Expand Up @@ -59,7 +58,6 @@ const Metadata = () => {
<h3 className="text-2xl font-semibold">Monument Metadata</h3>
<Spacer className="my-4" />
<NumberedForm onSubmit={handleSubmit(onSubmit)}>
<DevTool control={control} />
<NumberedFormSection number={1} title="Section Information">
<div>
<Input
Expand Down

0 comments on commit f14d139

Please sign in to comment.