diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-04 13:07:15 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-04 13:32:04 +0100 |
| commit | ab5e5f4bdf40b5bc1ccf82dc1b4aca94d5171ec3 (patch) | |
| tree | d5b26588c08cbc3aac1f281aa848e68c522eabcd /src/pages/contact.tsx | |
| parent | 1856796cef0989b10030906c9b1383d44800fb00 (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.tsx | 3 |
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); } }; |
