14 lines
525 B
JavaScript
14 lines
525 B
JavaScript
import React from 'react';
|
|
import QrCode from '../../common/qrCode';
|
|
import { DotLoading } from 'antd-mobile';
|
|
export default function Render(props) {
|
|
const { url, expiresAt, oakLoading, disableDownload, size, disabled, color, bgColor } = props.data;
|
|
if (oakLoading) {
|
|
return <DotLoading color="primary"/>;
|
|
}
|
|
if (url) {
|
|
return <QrCode url={url} expiresAt={expiresAt} disableDownload={disableDownload} size={size} disabled={disabled} color={color} bgColor={bgColor}/>;
|
|
}
|
|
return null;
|
|
}
|