import {JSONContent} from '@tiptap/core' import {formLink} from 'common/constants' import {MAX_DESCRIPTION_LENGTH} from 'common/envs/constants' import Link from 'next/link' import toast from 'react-hot-toast' import {Button} from 'web/components/buttons/button' import {Col} from 'web/components/layout/col' import {Row} from 'web/components/layout/row' import {TextEditor, useTextEditor} from 'web/components/widgets/editor' import {Title} from 'web/components/widgets/title' import {useUser} from 'web/hooks/use-user' import {api} from 'web/lib/api' import {useT} from 'web/lib/locale' // added export function ContactComponent() { const user = useUser() const t = useT() // use translations const editor = useTextEditor({ max: MAX_DESCRIPTION_LENGTH, defaultValue: '', placeholder: t('contact.editor.placeholder', 'Contact us here...'), // localized placeholder }) const showButton = !!editor?.getText().length return ( {t('contact.title', 'Contact')}

{t('contact.intro_prefix', 'You can also contact us through this ')} {t('contact.form_link', 'feedback form')} {t('contact.intro_middle', ' or any of our ')} {t('contact.socials', 'socials')} {t( 'contact.intro_suffix', ". Feel free to give your contact information if you'd like us to get back to you.", )}

{showButton && ( )} ) }