import { FC, useCallback, useState } from 'react'; import { TopTitle } from '@gitroom/frontend/components/launches/helpers/top.title.component'; import { SignaturesComponent } from '@gitroom/frontend/components/settings/signatures.component'; import { Transforms } from 'slate'; export const SignatureBox: FC<{ editor: any }> = ({ editor }) => { const [showModal, setShowModal] = useState(false); const addSignature = useCallback(() => { setShowModal(true); }, [showModal]); const appendValue = (val: string) => { Transforms.insertText(editor, "\n" + val); setShowModal(false); }; return ( <> {showModal && ( setShowModal(false)} /> )}
); }; export const SignatureModal: FC<{ close: () => void; appendSignature: (sign: string) => void; }> = (props) => { const { close, appendSignature } = props; return (
); };