Rename manga and chapter constants
This commit is contained in:
@@ -12,7 +12,7 @@ import { memo } from 'react';
|
||||
import BookmarkIcon from '@mui/icons-material/Bookmark';
|
||||
import BookmarkBorderIcon from '@mui/icons-material/BookmarkBorder';
|
||||
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||
import { actionToTranslationKey, ChapterAction, Chapters } from '@/modules/chapter/services/Chapters.ts';
|
||||
import { CHAPTER_ACTION_TO_TRANSLATION, ChapterAction, Chapters } from '@/modules/chapter/services/Chapters.ts';
|
||||
import { TChapterReader } from '@/modules/chapter/Chapter.types.ts';
|
||||
|
||||
const BaseReaderBookmarkButton = ({ id, isBookmarked }: Pick<TChapterReader, 'id' | 'isBookmarked'>) => {
|
||||
@@ -21,7 +21,7 @@ const BaseReaderBookmarkButton = ({ id, isBookmarked }: Pick<TChapterReader, 'id
|
||||
const bookmarkAction: Extract<ChapterAction, 'unbookmark' | 'bookmark'> = isBookmarked ? 'unbookmark' : 'bookmark';
|
||||
|
||||
return (
|
||||
<CustomTooltip title={t(actionToTranslationKey[bookmarkAction].action.single)}>
|
||||
<CustomTooltip title={t(CHAPTER_ACTION_TO_TRANSLATION[bookmarkAction].action.single)}>
|
||||
<IconButton onClick={() => Chapters.performAction(bookmarkAction, [id], {})} color="inherit">
|
||||
{isBookmarked ? <BookmarkIcon /> : <BookmarkBorderIcon />}
|
||||
</IconButton>
|
||||
|
||||
Reference in New Issue
Block a user