import React from 'react' import { useTranslation } from 'react-i18next' import { FormPublicDesignFragment, FormPublicPageFragment, } from '../../../../graphql/fragment/form.public.fragment' import { StyledButton } from '../../../styled/button' import { StyledH1 } from '../../../styled/h1' import { StyledMarkdown } from '../../../styled/markdown' import { PageButtons } from '../page.buttons' import scss from './page.module.scss' interface Props { page: FormPublicPageFragment design: FormPublicDesignFragment className?: string next: () => void prev: () => void } export const FormPage: React.FC = ({ page, design, next, prev, className, ...props }) => { const { t } = useTranslation() if (!page.show) { return null } return (
!!c).join(' ')} {...props}>
{page.title} {page.paragraph}
{prev && ( {t('form:previous')} )}
{page.buttonText || t('form:continue')}
) }