Compare commits

..

2 Commits

View File

@ -108,7 +108,8 @@ function ColorlibStepIcon(props: StepIconProps) {
const qrCode = new QRCodeStyling({ const qrCode = new QRCodeStyling({
width: 300, width: 300,
height: 300, height: 300,
// image: popalogo, image: popalogo,
data: 'https://t.me/popa_popa_popa_bot?start=test',
shape: 'square', shape: 'square',
margin: 10, margin: 10,
dotsOptions: { dotsOptions: {
@ -125,7 +126,7 @@ const qrCode = new QRCodeStyling({
}, },
], ],
}, },
type: 'rounded', type: 'extra-rounded',
}, },
imageOptions: { imageOptions: {
crossOrigin: 'anonymous', crossOrigin: 'anonymous',
@ -179,6 +180,45 @@ export const Registration = () => {
handleGenerateVerificationCode(username); handleGenerateVerificationCode(username);
setUrl(`https://t.me/popa_popa_popa_bot?start=${username}`); setUrl(`https://t.me/popa_popa_popa_bot?start=${username}`);
while (ref.current.firstChild) {
ref.current.removeChild(ref.current.firstChild);
}
const newQrCode = new QRCodeStyling({
width: 300,
height: 300,
image: popalogo,
data: 'https://t.me/popa_popa_popa_bot?start=test',
shape: 'square',
margin: 10,
dotsOptions: {
gradient: {
type: 'linear',
colorStops: [
{
offset: 0,
color: 'rgb(242,113,33)',
},
{
offset: 1,
color: 'rgb(233,64,87)',
},
],
},
type: 'extra-rounded',
},
imageOptions: {
crossOrigin: 'anonymous',
margin: 20,
imageSize: 0.5,
},
backgroundOptions: {
color: 'transparent',
},
});
newQrCode.append(ref.current);
const intervalId = setInterval(() => { const intervalId = setInterval(() => {
handleVerifyCode(); handleVerifyCode();
}, 5000); }, 5000);
@ -340,7 +380,12 @@ export const Registration = () => {
> >
Открыть бота Открыть бота
</Button> </Button>
<div ref={ref} /> <div
ref={ref}
style={{
minHeight: 300,
}}
/>
<Typography variant="body1"> <Typography variant="body1">
Введите код верификации в боте Введите код верификации в боте
</Typography> </Typography>