address comments from @aniket-engg

pull/3395/head
Joseph Izang 2 years ago
parent 3097f3c25c
commit 9861d4c96c
  1. 8
      libs/remix-ui/solidity-uml-gen/src/lib/components/UmlDownload.tsx
  2. 2
      libs/remix-ui/solidity-uml-gen/src/lib/solidity-uml-gen.tsx
  3. 1
      libs/remix-ui/solidity-uml-gen/src/lib/utilities/UmlDownloadStrategy.ts

@ -72,10 +72,6 @@ export default function UmlDownload(props: UmlDownloadProps) {
<span
id='umlPngDownloadBtn'
data-id='umlPngDownload'
onClick={() => {
_paq.push(['trackEvent', 'solidityumlgen', 'download', 'downloadAsPng'])
props.download('png')
}}
className='far fa-image pl-2'
>
</span>
@ -103,10 +99,6 @@ export default function UmlDownload(props: UmlDownloadProps) {
<span
id='umlPdfDownloadBtn'
data-id='umlPdfDownload'
onClick={() => {
_paq.push(['trackEvent', 'solUmlgen', 'download', 'downloadAsPdf'])
props.download('pdf')
}}
className='far fa-file-pdf pl-2'
>
</span>

@ -42,10 +42,8 @@ export function RemixUiSolidityUmlGen ({ updatedSvg, loading, fileName }: RemixU
const download = useCallback((fileType: UmlFileType) => {
if (umlCopy.length === 0) {
console.log('svg not valid yet!')
return
}
console.log({ umlCopy })
umlDownloader.download(umlCopy, fileName, fileType)
}, [updatedSvg, fileName])

@ -59,7 +59,6 @@ class ImageUmlDownloadStrategy implements IUmlDownloadStrategy {
const a = document.createElement('a')
a.download = fileName.split('/')[1].split('.')[0].concat('.png')
a.href = png
console.log('about to click the link to download the png!!!')
a.click()
}
img.src = url

Loading…
Cancel
Save