anime info (desktop) resolved

This commit is contained in:
tejaspanchall
2025-06-05 19:56:08 +05:30
parent c4cddc9223
commit 04cbfb9d4a

View File

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