import Typography from '@mui/material/Typography'; import {useTheme} from '@mui/material/styles'; import Icon from '@mui/material/Icon'; import FormControlLabel from '@mui/material/FormControlLabel'; import Checkbox from '@mui/material/Checkbox'; import Button from '@mui/material/Button'; import Box from '@mui/material/Box'; import {useTranslation} from 'react-i18next'; import {useState} from 'react'; import pageUtils from '../../../lib/pageUtils'; import CommonConfirm from '../../../layouts/ConfirmLayout'; import {useUpdateMeMutation} from '../../../generated/graphql'; import router from 'next/router'; const Confirm = () => { const theme = useTheme(); const {t} = useTranslation(); const [newsletterConsent, setNewsletterConsent] = useState(false); const [updateMe] = useUpdateMeMutation(); const onSubmit = async () => { await updateMe({variables: {userUpdate: {newsletterConsent}}}); router.push('/dashboard'); }; return ( {t('signup.create')} {t('confirm.google.title')} mail setNewsletterConsent(checked) } /> } label={t('signup.newsletter.consent')} /> ); }; export default Confirm; export const getServerSideProps = pageUtils.getServerSideProps();