handle front, handle orphans

This commit is contained in:
Aria Moradi
2021-05-11 18:45:53 +04:30
parent 8abb132ad6
commit c200785479
3 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ export default function ChapterCard(props: IProps) {
const history = useHistory();
const { chapter } = props;
const dateStr = chapter.date_upload && new Date(chapter.date_upload).toISOString().slice(0, 10);
const dateStr = chapter.uploadDate && new Date(chapter.uploadDate).toISOString().slice(0, 10);
return (
<>
@@ -60,7 +60,7 @@ export default function ChapterCard(props: IProps) {
<div style={{ display: 'flex', flexDirection: 'column' }}>
<Typography variant="h5" component="h2">
{chapter.name}
{chapter.chapter_number > 0 && ` : ${chapter.chapter_number}`}
{chapter.chapterNumber > 0 && ` : ${chapter.chapterNumber}`}
</Typography>
<Typography variant="caption" display="block" gutterBottom>
{chapter.scanlator}
+5 -2
View File
@@ -56,10 +56,13 @@ interface IChapter {
id: number
url: string
name: string
date_upload: number
chapter_number: number
uploadDate: number
chapterNumber: number
scanlator: String
mangaId: number
read: boolean
bookmarked: boolean
lastPageRead: number
chapterIndex: number
chapterCount: number
pageCount: number