better chapter looks

This commit is contained in:
Aria Moradi 2021-05-19 16:50:48 +04:30
parent 02802fab97
commit c5874a3f10

View File

@ -26,9 +26,6 @@ const useStyles = makeStyles((theme) => ({
alignItems: 'center', alignItems: 'center',
padding: 16, padding: 16,
}, },
read: {
backgroundColor: theme.palette.type === 'dark' ? '#353535' : '#f0f0f0',
},
bullet: { bullet: {
display: 'inline-block', display: 'inline-block',
margin: '0 2px', margin: '0 2px',
@ -80,16 +77,17 @@ export default function ChapterCard(props: IProps) {
.then(() => triggerChaptersUpdate()); .then(() => triggerChaptersUpdate());
}; };
const readChapterColor = theme.palette.type === 'dark' ? '#acacac' : '#b0b0b0';
return ( return (
<> <>
<li> <li>
<Card> <Card>
<CardContent className={`${classes.root} ${chapter.read && classes.read}`}> <CardContent className={classes.root}>
<Link <Link
to={`/manga/${chapter.mangaId}/chapter/${chapter.index}`} to={`/manga/${chapter.mangaId}/chapter/${chapter.index}`}
style={{ style={{
textDecoration: 'none', textDecoration: 'none',
color: theme.palette.text.primary, color: chapter.read ? readChapterColor : theme.palette.text.primary,
}} }}
> >
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>