remove console prints

This commit is contained in:
Aria Moradi 2021-05-13 17:49:33 +04:30
parent dc012edf7d
commit a02dc02d52

View File

@ -41,17 +41,9 @@ const useStyles = makeStyles((theme: Theme) => ({
}, },
})); }));
const InnerItem = React.memo(({ chapters, index }: any) => { const InnerItem = React.memo(({ chapters, index }: any) => (
React.useEffect(() => {
console.log('inner mounting', index);
return () => {
console.log('inner unmounting', index);
};
}, [index]);
return (
<ChapterCard chapter={chapters[index]} /> <ChapterCard chapter={chapters[index]} />
); ));
});
export default function Manga() { export default function Manga() {
const classes = useStyles(); const classes = useStyles();
@ -80,10 +72,7 @@ export default function Manga() {
.then((data) => setChapters(data)); .then((data) => setChapters(data));
}, []); }, []);
const itemContent = (index:any) => { const itemContent = (index:any) => <InnerItem chapters={chapters} index={index} />;
console.log('providing content', index);
return <InnerItem chapters={chapters} index={index} />;
};
return ( return (
<div className={classes.root}> <div className={classes.root}>