diff --git a/src/components/manga/MangaDetails.tsx b/src/components/manga/MangaDetails.tsx index 5d14a1a8..4a4bceca 100644 --- a/src/components/manga/MangaDetails.tsx +++ b/src/components/manga/MangaDetails.tsx @@ -9,7 +9,7 @@ import FavoriteIcon from '@mui/icons-material/Favorite'; import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder'; import { styled, useTheme } from '@mui/material/styles'; -import { ComponentProps, useEffect, useMemo } from 'react'; +import { ComponentProps, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { t as translate } from 'i18next'; import Link from '@mui/material/Link'; @@ -103,6 +103,7 @@ const Thumbnail = ({ manga }: { manga: Partial }) => { const theme = useTheme(); const popupState = usePopupState({ variant: 'popover', popupId: 'manga-thumbnail-fullscreen' }); + const [isImageReady, setIsImageReady] = useState(false); return ( <> @@ -125,6 +126,7 @@ const Thumbnail = ({ manga }: { manga: Partial }) => { setIsImageReady(true)} spinnerStyle={{ borderRadius: 0.5, width: '150px', @@ -139,25 +141,27 @@ const Thumbnail = ({ manga }: { manga: Partial }) => { }, }} /> - - - + {isImageReady && ( + + + + )}