import { FC, FormEvent, SyntheticEvent, useEffect, useState } from 'react' import { result } from '../../../common/result' import { createWish, Wish } from '../models' import { v4 as uuid } from 'uuid' interface CreateWishProps { onFocus: () => void hasFocus: boolean onSubmit: (wish: Wish) => void wish: Wish } const CreateWish: FC = (props) => { return (
props.onFocus()}>
props.onSubmit({ ...props.wish, name: e.target.value }) } value={props.wish.name} />
) } interface InnerWishPromptInterface { wish: Wish onChange: (wish: Wish) => void } const InnerWishPrompt: FC = (props) => { return (