Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint error #235

Merged
merged 1 commit into from
Feb 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions src/components/navbar/ReaderNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,7 @@ export default function ReaderNavBar(props: IProps) {
<Navigation>
<PageNavigation>
<span>Currently on page</span>
<FormControl
size="small"
sx={{ margin: '0 5px' }}
disabled={chapter.pageCount === -1}
>
<FormControl size="small" sx={{ margin: '0 5px' }} disabled={chapter.pageCount === -1}>
<Select
MenuProps={MenuProps}
value={chapter.pageCount > -1 ? curPage : ''}
Expand Down Expand Up @@ -300,11 +296,7 @@ export default function ReaderNavBar(props: IProps) {
>
<KeyboardArrowLeftIcon />
</IconButton>
<FormControl
sx={{ gridArea: 'current' }}
size="small"
disabled={chapter.index < 1}
>
<FormControl sx={{ gridArea: 'current' }} size="small" disabled={chapter.index < 1}>
<Select
MenuProps={MenuProps}
value={chapter.index >= 1 ? chapter.index : ''}
Expand All @@ -324,19 +316,16 @@ export default function ReaderNavBar(props: IProps) {
.map((ignoreValue, index) => (
// eslint-disable-next-line max-len
// eslint-disable-next-line react/no-array-index-key
<MenuItem
key={`Chapter#${index + 1}`}
value={index + 1}
>{`Chapter ${index + 1}`}</MenuItem>
<MenuItem key={`Chapter#${index + 1}`} value={index + 1}>{`Chapter ${
index + 1
}`}</MenuItem>
))}
</Select>
</FormControl>
<IconButton
title="Next Chapter"
sx={{ gridArea: 'next' }}
disabled={
chapter.index < 1 || chapter.index >= chapter.chapterCount
}
disabled={chapter.index < 1 || chapter.index >= chapter.chapterCount}
onClick={() => {
history.replace({
pathname: `/manga/${manga.id}/chapter/${chapter.index + 1}`,
Expand Down