('');
const submitMail: ContactFormProps['sendMail'] = async (data, reset) => {
const { email, message, name, subject } = data;
const messageHTML = message.replace(/\r?\n/g, '
');
const body = `Message received from ${name} <${email}> on ${website.url}.
${messageHTML}`;
const replyTo = `${name} <${email}>`;
const mailData = {
body,
clientMutationId: 'contact',
replyTo,
subject,
};
const { message: mutationMessage, sent } = await sendMail(mailData);
if (sent) {
setStatus('success');
setStatusMessage(
intl.formatMessage({
defaultMessage:
'Thanks. Your message was successfully sent. I will answer it as soon as possible.',
description: 'Contact: success message',
id: '3Pipok',
})
);
reset();
} else {
const errorPrefix = intl.formatMessage({
defaultMessage: 'An error occurred:',
description: 'Contact: error message',
id: 'TpyFZ6',
});
const error = `${errorPrefix} ${mutationMessage}`;
setStatus('error');
setStatusMessage(error);
}
};
return (
<>
{`${seo.title} - ${website.name}`}
}
/>
>
);
};
ContactPage.getLayout = (page) =>
getLayout(page, { useGrid: true, withExtraPadding: true });
export const getStaticProps: GetStaticProps = async ({ locale }) => {
const translation = await loadTranslation(locale);
return {
props: {
translation,
},
};
};
export default ContactPage;
='n56' href='#n56'>56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
!(function (e) {
var r = '(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)'.replace(
/<SP_BS>/g,
function () {
return '\\\\[\r\n](?:\\s|\\\\[\r\n]|#.*(?!.))*(?![\\s#]|\\\\[\r\n])';
}
),
n =
'"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*"|\'(?:[^\'\\\\\r\n]|\\\\(?:\r\n|[^]))*\'',
t = '--[\\w-]+=(?:<STR>|(?!["\'])(?:[^\\s\\\\]|\\\\.)+)'.replace(
/<STR>/g,
function () {
return n;
}
),
o = { pattern: RegExp(n), greedy: !0 },
i = { pattern: /(^[ \t]*)#.*/m, lookbehind: !0, greedy: !0 };
function a(e, n) {
return (
(e = e
.replace(/<OPT>/g, function () {
return t;
})
.replace(/<SP>/g, function () {
return r;
})),
RegExp(e, n)
);
}
(e.languages.docker = {
instruction: {
pattern:
/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,
lookbehind: !0,
greedy: !0,
inside: {
options: {
pattern: a('(^(?:ONBUILD<SP>)?\\w+<SP>)<OPT>(?:<SP><OPT>)*', 'i'),
lookbehind: !0,
greedy: !0,
inside: {
property: { pattern: /(^|\s)--[\w-]+/, lookbehind: !0 },
string: [
o,
{ pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/, lookbehind: !0 },
],
operator: /\\$/m,
punctuation: /=/,
},
},
keyword: [
{
pattern: a(
'(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\\b',
'i'
),
lookbehind: !0,
greedy: !0,
},
{
pattern: a(
'(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\\\]+<SP>)AS',
'i'
),
lookbehind: !0,
greedy: !0,
},
{ pattern: a('(^ONBUILD<SP>)\\w+', 'i'), lookbehind: !0, greedy: !0 },
{ pattern: /^\w+/, greedy: !0 },
],
comment: i,
string: o,
variable: /\$(?:\w+|\{[^{}"'\\]*\})/,
operator: /\\$/m,
},
},
comment: i,
}),
(e.languages.dockerfile = e.languages.docker);
})(Prism);
|