Cockatrice/webclient/src/containers/Account/AddToBuddies.tsx
Brent Clark 513fcb0908
Webclient: Handle firing an event once (#4499)
* draft: handle firing an event once

* lint

* Prevent rapid double-click on sending messages

* no rest spread on single primative when sibling components exist

* clear message instead of using a fireOnce handler.

* fix tests

* remove unnecessary validate mock
2022-01-30 12:14:28 -05:00

16 lines
405 B
TypeScript

import React from 'react';
import { Form } from 'react-final-form'
import { InputAction } from 'components';
const AddToBuddies = ({ onSubmit }) => (
<Form onSubmit={values => onSubmit(values)}>
{({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<InputAction action="Add" label="Add to Buddies" name="userName" />
</form>
)}
</Form>
);
export default AddToBuddies;