diff --git a/src/components/manga/MangaDetails.tsx b/src/components/manga/MangaDetails.tsx index 2d020329..1670c9e6 100644 --- a/src/components/manga/MangaDetails.tsx +++ b/src/components/manga/MangaDetails.tsx @@ -183,31 +183,36 @@ const DescriptionGenre = ({ }) => { const [isCollapsed, setIsCollapsed] = useLocalStorage('isDescriptionGenreCollapsed', true); + const collapsedSize = description ? DESCRIPTION_COLLAPSED_SIZE : 0; + return ( <> - - - - {description} - - - setIsCollapsed(!isCollapsed)} - sx={{ - pt: 1, - alignItems: 'center', - cursor: 'pointer', - position: isCollapsed ? 'absolute' : null, - width: '100%', - bottom: 0, - background: (theme) => `linear-gradient(transparent 1px, ${theme.palette.background.default})`, - }} - > - (theme.palette.mode === 'light' ? 'black' : 'text') }}> - {isCollapsed ? : } - + {description && ( + + + + {description} + + + setIsCollapsed(!isCollapsed)} + sx={{ + pt: 1, + alignItems: 'center', + cursor: 'pointer', + position: isCollapsed ? 'absolute' : null, + width: '100%', + bottom: 0, + background: (theme) => + `linear-gradient(transparent 1px, ${theme.palette.background.default})`, + }} + > + (theme.palette.mode === 'light' ? 'black' : 'text') }}> + {isCollapsed ? : } + + - + )}