Properly disable open source button in manga page (#663)
This commit is contained in:
@@ -133,17 +133,12 @@ const Genres = styled('div')(() => ({
|
|||||||
const OpenSourceButton = ({ url }: { url?: string | null }) => {
|
const OpenSourceButton = ({ url }: { url?: string | null }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const button = useMemo(
|
if (!url) {
|
||||||
() => (
|
return (
|
||||||
<Button disabled={!!url} startIcon={<PublicIcon />} size="large">
|
<Button disabled={!url} startIcon={<PublicIcon />} size="large">
|
||||||
{t('global.button.open_site')}
|
{t('global.button.open_site')}
|
||||||
</Button>
|
</Button>
|
||||||
),
|
);
|
||||||
[url],
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!url) {
|
|
||||||
return button;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user