add spacebar before try number
This commit is contained in:
parent
f8ee502fee
commit
01ab408d51
@ -17,6 +17,7 @@ export interface RetryProps {
|
|||||||
const Retry: FC<RetryProps> = (props: RetryProps) => {
|
const Retry: FC<RetryProps> = (props: RetryProps) => {
|
||||||
const { error, text, retryFunc } = props;
|
const { error, text, retryFunc } = props;
|
||||||
|
|
||||||
|
// relies on the element being replaced with null when not in use
|
||||||
const [attempts, setAttempts] = useState(0);
|
const [attempts, setAttempts] = useState(0);
|
||||||
|
|
||||||
const [retryCallable, buttonText, buttonShaking] = useAsyncSubmitButton(
|
const [retryCallable, buttonText, buttonShaking] = useAsyncSubmitButton(
|
||||||
@ -32,10 +33,10 @@ const Retry: FC<RetryProps> = (props: RetryProps) => {
|
|||||||
},
|
},
|
||||||
[retryFunc],
|
[retryFunc],
|
||||||
{
|
{
|
||||||
start: `Try Again ${attempts ? `#${attempts + 1}` : ''}`,
|
start: `Try Again${attempts ? ` #${attempts + 1}` : ''}`,
|
||||||
pending: 'Fetching...',
|
pending: 'Fetching...',
|
||||||
done: `Try Again ${attempts ? `#${attempts + 1}` : ''}`,
|
done: `Try Again${attempts ? ` #${attempts + 1}` : ''}`,
|
||||||
error: `Try Again ${attempts ? `#${attempts + 1}` : ''}`,
|
error: `Try Again${attempts ? ` #${attempts + 1}` : ''}`,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user