import React, { useRef, MutableRefObject } from "react"; import { BaseButton } from "../../components/designSystems/blueprint/ButtonComponent"; import { ControlGroup, Classes } from "@blueprintjs/core"; type CreateApplicationFormProps = { onCreate: (name: string) => void; creating: boolean; error?: string; }; export const CreateApplicationForm = (props: CreateApplicationFormProps) => { const inputRef: MutableRefObject = useRef(null); const handleCreate = () => { if (inputRef && inputRef.current) { props.onCreate(inputRef.current.value); } else { //TODO (abhinav): Add validation code. } }; return ( ); }; export default CreateApplicationForm;