mirror of
https://github.com/JustAnimeCore/JustAnime.git
synced 2026-04-17 22:01:45 +00:00
anime info (desktop) resolved
This commit is contained in:
@@ -15,6 +15,14 @@ export default function AnimeDetails({ anime }) {
|
||||
|
||||
console.log('AnimeDetails received:', anime);
|
||||
|
||||
// Check if synopsis overflows when component mounts or when content changes
|
||||
useEffect(() => {
|
||||
if (synopsisRef.current) {
|
||||
const element = synopsisRef.current;
|
||||
setSynopsisOverflows(element.scrollHeight > element.clientHeight);
|
||||
}
|
||||
}, [anime?.info?.description, activeTab]);
|
||||
|
||||
if (!anime?.info) {
|
||||
console.error('Invalid anime data structure:', anime);
|
||||
return null;
|
||||
@@ -24,14 +32,6 @@ export default function AnimeDetails({ anime }) {
|
||||
const hasCharacters = info.characterVoiceActor?.length > 0 || info.charactersVoiceActors?.length > 0;
|
||||
const hasVideos = info.promotionalVideos && info.promotionalVideos.length > 0;
|
||||
|
||||
// Check if synopsis overflows when component mounts or when content changes
|
||||
useEffect(() => {
|
||||
if (synopsisRef.current) {
|
||||
const element = synopsisRef.current;
|
||||
setSynopsisOverflows(element.scrollHeight > element.clientHeight);
|
||||
}
|
||||
}, [info.description, activeTab]);
|
||||
|
||||
// Video modal for promotional videos
|
||||
const VideoModal = ({ video, onClose }) => {
|
||||
if (!video) return null;
|
||||
|
||||
Reference in New Issue
Block a user