mirror of
https://github.com/SomboChea/ui
synced 2026-01-20 01:55:56 +07:00
ActionBar Component - Replaced class by func. comp (#330)
This commit is contained in:
committed by
GitHub
parent
fcad6fa794
commit
742971db0d
@@ -9,7 +9,7 @@ import fileSizeSI from '../../utils/file-size';
|
||||
import { formatDate, formatDateDistance } from '../../utils/package';
|
||||
import Tooltip from '../../muiComponents/Tooltip';
|
||||
import { isURL } from '../../utils/url';
|
||||
import { downloadHandler } from '../ActionBar/ActionBar';
|
||||
import { downloadTarball } from '../ActionBar';
|
||||
import ListItem from '../../muiComponents/ListItem';
|
||||
import Grid from '../../muiComponents/Grid';
|
||||
|
||||
@@ -140,7 +140,7 @@ const Package: React.FC<PackageInterface> = ({
|
||||
dist.tarball &&
|
||||
isURL(dist.tarball) && (
|
||||
// eslint-disable-next-line
|
||||
<a onClick={() => downloadHandler(dist.tarball.replace(`https://registry.npmjs.org/`, window.location.href))} target={'_blank'}>
|
||||
<a onClick={downloadTarball(dist.tarball.replace(`https://registry.npmjs.org/`, window.location.href))} target={'_blank'}>
|
||||
<Tooltip aria-label={'Download the tar file'} title={'Download tarball'}>
|
||||
<IconButton aria-label={'Download'}>
|
||||
{/* eslint-disable-next-line react/jsx-max-depth */}
|
||||
|
||||
Reference in New Issue
Block a user