Prevent tooltip on disabled button warning
This commit is contained in:
@@ -15,7 +15,6 @@ import { t as translate } from 'i18next';
|
||||
import Link from '@mui/material/Link';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Chip from '@mui/material/Chip';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import LaunchIcon from '@mui/icons-material/Launch';
|
||||
import Collapse from '@mui/material/Collapse';
|
||||
import Stack from '@mui/material/Stack';
|
||||
@@ -28,6 +27,7 @@ import { bindPopover, bindTrigger, usePopupState } from 'material-ui-popup-state
|
||||
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
||||
import { Vibrant } from 'node-vibrant/browser';
|
||||
import { FastAverageColor } from 'fast-average-color';
|
||||
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||
import { Mangas } from '@/modules/manga/services/Mangas.ts';
|
||||
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
||||
@@ -129,7 +129,7 @@ const OpenSourceButton = ({ url }: { url?: string | null }) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Tooltip title={t('global.button.open_site')}>
|
||||
<CustomTooltip title={t('global.button.open_site')} disabled={!url}>
|
||||
<CustomIconButton
|
||||
size="medium"
|
||||
disabled={!url}
|
||||
@@ -141,7 +141,7 @@ const OpenSourceButton = ({ url }: { url?: string | null }) => {
|
||||
>
|
||||
<LaunchIcon />
|
||||
</CustomIconButton>
|
||||
</Tooltip>
|
||||
</CustomTooltip>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -391,11 +391,11 @@ export const MangaDetails = ({
|
||||
<Typography variant="h5" component="h2" sx={{ wordBreak: 'break-word' }}>
|
||||
{manga.title}
|
||||
</Typography>
|
||||
<Tooltip title={t('global.button.copy')}>
|
||||
<CustomTooltip title={t('global.button.copy')}>
|
||||
<IconButton onClick={copyTitle} color="inherit">
|
||||
<ContentCopyIcon fontSize="small" />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</CustomTooltip>
|
||||
</Stack>
|
||||
<Metadata title={t('manga.label.author')} value={getValueOrUnknown(manga.author)} />
|
||||
<Metadata title={t('manga.label.artist')} value={getValueOrUnknown(manga.artist)} />
|
||||
|
||||
Reference in New Issue
Block a user