Properly disable open source button in manga page (#663)

This commit is contained in:
schroda
2024-03-22 03:33:19 +01:00
committed by GitHub
parent 0ad08360a2
commit 452ac4fd9a

View File

@@ -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 (