aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/contact.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-04 13:07:15 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-04 13:32:04 +0100
commitab5e5f4bdf40b5bc1ccf82dc1b4aca94d5171ec3 (patch)
treed5b26588c08cbc3aac1f281aa848e68c522eabcd /src/pages/contact.tsx
parent1856796cef0989b10030906c9b1383d44800fb00 (diff)
refactor(sharing): avoid nested template literals
This improves readability. I also rename a variable to avoid duplicate between global scope and useEffect scope.
Diffstat (limited to 'src/pages/contact.tsx')
-rw-r--r--src/pages/contact.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx
index 8e6de7a..3ce6098 100644
--- a/src/pages/contact.tsx
+++ b/src/pages/contact.tsx
@@ -42,7 +42,8 @@ const ContactPage: NextPageWithLayout = () => {
);
resetForm();
} else {
- const error = `${t`An error occurred:`} ${mail.message}`;
+ const errorPrefix = t`An error occurred:`;
+ const error = `${errorPrefix} ${mail.message}`;
setStatus(error);
}
};