Add "last read timestamp" to history chapter card
This commit is contained in:
@@ -28,6 +28,7 @@ import { requestManager } from '@/lib/requests/RequestManager.ts';
|
|||||||
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { Chapters } from '@/modules/chapter/services/Chapters.ts';
|
import { Chapters } from '@/modules/chapter/services/Chapters.ts';
|
||||||
|
import { epochToDate, timeFormatter } from '@/util/DateHelper.ts';
|
||||||
|
|
||||||
export const ChapterHistoryCard = memo(({ chapter }: { chapter: ChapterHistoryListFieldsFragment }) => {
|
export const ChapterHistoryCard = memo(({ chapter }: { chapter: ChapterHistoryListFieldsFragment }) => {
|
||||||
const { manga } = chapter;
|
const { manga } = chapter;
|
||||||
@@ -108,7 +109,7 @@ export const ChapterHistoryCard = memo(({ chapter }: { chapter: ChapterHistoryLi
|
|||||||
{manga.title}
|
{manga.title}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
<TypographyMaxLines variant="caption" display="block" lines={1}>
|
<TypographyMaxLines variant="caption" display="block" lines={1}>
|
||||||
{chapter.name}
|
{`${chapter.name} — ${timeFormatter.format(epochToDate(Number(chapter.lastReadAt)).valueOf())}`}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user