Fix lint error (#235)
This commit is contained in:
@@ -258,11 +258,7 @@ export default function ReaderNavBar(props: IProps) {
|
|||||||
<Navigation>
|
<Navigation>
|
||||||
<PageNavigation>
|
<PageNavigation>
|
||||||
<span>Currently on page</span>
|
<span>Currently on page</span>
|
||||||
<FormControl
|
<FormControl size="small" sx={{ margin: '0 5px' }} disabled={chapter.pageCount === -1}>
|
||||||
size="small"
|
|
||||||
sx={{ margin: '0 5px' }}
|
|
||||||
disabled={chapter.pageCount === -1}
|
|
||||||
>
|
|
||||||
<Select
|
<Select
|
||||||
MenuProps={MenuProps}
|
MenuProps={MenuProps}
|
||||||
value={chapter.pageCount > -1 ? curPage : ''}
|
value={chapter.pageCount > -1 ? curPage : ''}
|
||||||
@@ -300,11 +296,7 @@ export default function ReaderNavBar(props: IProps) {
|
|||||||
>
|
>
|
||||||
<KeyboardArrowLeftIcon />
|
<KeyboardArrowLeftIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<FormControl
|
<FormControl sx={{ gridArea: 'current' }} size="small" disabled={chapter.index < 1}>
|
||||||
sx={{ gridArea: 'current' }}
|
|
||||||
size="small"
|
|
||||||
disabled={chapter.index < 1}
|
|
||||||
>
|
|
||||||
<Select
|
<Select
|
||||||
MenuProps={MenuProps}
|
MenuProps={MenuProps}
|
||||||
value={chapter.index >= 1 ? chapter.index : ''}
|
value={chapter.index >= 1 ? chapter.index : ''}
|
||||||
@@ -324,19 +316,16 @@ export default function ReaderNavBar(props: IProps) {
|
|||||||
.map((ignoreValue, index) => (
|
.map((ignoreValue, index) => (
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
// eslint-disable-next-line react/no-array-index-key
|
// eslint-disable-next-line react/no-array-index-key
|
||||||
<MenuItem
|
<MenuItem key={`Chapter#${index + 1}`} value={index + 1}>{`Chapter ${
|
||||||
key={`Chapter#${index + 1}`}
|
index + 1
|
||||||
value={index + 1}
|
}`}</MenuItem>
|
||||||
>{`Chapter ${index + 1}`}</MenuItem>
|
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<IconButton
|
<IconButton
|
||||||
title="Next Chapter"
|
title="Next Chapter"
|
||||||
sx={{ gridArea: 'next' }}
|
sx={{ gridArea: 'next' }}
|
||||||
disabled={
|
disabled={chapter.index < 1 || chapter.index >= chapter.chapterCount}
|
||||||
chapter.index < 1 || chapter.index >= chapter.chapterCount
|
|
||||||
}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.replace({
|
history.replace({
|
||||||
pathname: `/manga/${manga.id}/chapter/${chapter.index + 1}`,
|
pathname: `/manga/${manga.id}/chapter/${chapter.index + 1}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user