import { Button, InputGroup } from 'react-bootstrap' import React, { useState, useRef, useEffect } from 'react' import * as Yup from 'yup' import { Form, Input, SubmitButton } from './form' import { useMe } from './me' import UpBolt from '../svgs/bolt.svg' export const ActSchema = Yup.object({ amount: Yup.number().typeError('must be a number').required('required') .positive('must be positive').integer('must be whole') }) export default function ItemAct ({ onClose, itemId, act, strike }) { const inputRef = useRef(null) const me = useMe() const [oValue, setOValue] = useState() useEffect(() => { inputRef.current?.focus() }, [onClose, itemId]) return (
{ await act({ variables: { id: itemId, sats: Number(amount) } }) await strike() onClose() }} > sats} />
{[1, 10, 100, 1000, 10000].map(num => )}
tip
) }