From 01ab408d517dbf40aeaea47c66b09c362c52cf77 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Wed, 25 Jan 2023 21:11:30 -0800 Subject: [PATCH] add spacebar before try number --- src/client/webapp/elements/components/retry.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/webapp/elements/components/retry.tsx b/src/client/webapp/elements/components/retry.tsx index 8d5061c..ae8b252 100644 --- a/src/client/webapp/elements/components/retry.tsx +++ b/src/client/webapp/elements/components/retry.tsx @@ -17,6 +17,7 @@ export interface RetryProps { const Retry: FC = (props: RetryProps) => { const { error, text, retryFunc } = props; + // relies on the element being replaced with null when not in use const [attempts, setAttempts] = useState(0); const [retryCallable, buttonText, buttonShaking] = useAsyncSubmitButton( @@ -32,10 +33,10 @@ const Retry: FC = (props: RetryProps) => { }, [retryFunc], { - start: `Try Again ${attempts ? `#${attempts + 1}` : ''}`, + start: `Try Again${attempts ? ` #${attempts + 1}` : ''}`, pending: 'Fetching...', - done: `Try Again ${attempts ? `#${attempts + 1}` : ''}`, - error: `Try Again ${attempts ? `#${attempts + 1}` : ''}`, + done: `Try Again${attempts ? ` #${attempts + 1}` : ''}`, + error: `Try Again${attempts ? ` #${attempts + 1}` : ''}`, }, );