Fix QR code form polling timeout state (#187)

This commit is contained in:
Ildar Galeev 2023-05-16 12:51:39 +03:00 committed by GitHub
parent 9125736934
commit 63c843c644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,25 +57,31 @@ export const QrCodeInteractionForm: React.FC = () => {
return (
<Container>
{qrCodeForm?.isCopyCodeBlock && (
{qrCodeForm && (
<>
<Input
id="qr-code-input"
inputRef={qrCodeInputRef}
defaultValue={request.qrCode}
readOnly={true}></Input>
<CopyToClipboardButton onClick={() => copyToClipboard()} />
<Hr />
</>
)}
<Instruction>{locale['form.qr.code']}</Instruction>
<QRCode text={request.qrCode} />
{initConfig.redirectUrl && (
<>
<Hr />
<Button id="back-to-website-btn" onClick={() => window.open(initConfig.redirectUrl, '_self')}>
{locale['form.button.back.to.website']}
</Button>
{qrCodeForm.isCopyCodeBlock && (
<>
<Input
id="qr-code-input"
inputRef={qrCodeInputRef}
defaultValue={request.qrCode}
readOnly={true}></Input>
<CopyToClipboardButton onClick={() => copyToClipboard()} />
<Hr />
</>
)}
<Instruction>{locale['form.qr.code']}</Instruction>
<QRCode text={request.qrCode} />
{initConfig.redirectUrl && (
<>
<Hr />
<Button
id="back-to-website-btn"
onClick={() => window.open(initConfig.redirectUrl, '_self')}>
{locale['form.button.back.to.website']}
</Button>
</>
)}
</>
)}
</Container>