From 1b34f85f0e3188861c6804666f02b4495cab033c Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 14 Feb 2022 15:48:34 +0100
Subject: chore: improve comment form user experience

---
 src/components/Spinner/Spinner.tsx | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'src/components/Spinner/Spinner.tsx')

diff --git a/src/components/Spinner/Spinner.tsx b/src/components/Spinner/Spinner.tsx
index 381fbb6..afe86f6 100644
--- a/src/components/Spinner/Spinner.tsx
+++ b/src/components/Spinner/Spinner.tsx
@@ -1,7 +1,7 @@
 import { useIntl } from 'react-intl';
 import styles from './Spinner.module.scss';
 
-const Spinner = () => {
+const Spinner = ({ message }: { message?: string }) => {
   const intl = useIntl();
 
   return (
@@ -10,10 +10,11 @@ const Spinner = () => {
       <div className={styles.ball}></div>
       <div className={styles.ball}></div>
       <div className={styles.text}>
-        {intl.formatMessage({
-          defaultMessage: 'Loading...',
-          description: 'Spinner: loading text',
-        })}
+        {message ||
+          intl.formatMessage({
+            defaultMessage: 'Loading...',
+            description: 'Spinner: loading text',
+          })}
       </div>
     </div>
   );
-- 
cgit v1.2.3

