Skip to content

Commit 8816411

Browse files
committed
change JSX for JS
1 parent dd5b9d0 commit 8816411

5 files changed

Lines changed: 24 additions & 16 deletions

File tree

src/components/BibleBookList/BibleBookList.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ function BibleBookList({
9696
) : (
9797
''
9898
);
99-
100-
return (
101-
<>
102-
{checkboxRender}
103-
{testamentList.map((el, index) => {
99+
const bookListRender = testamentList.map((el, index) => {
104100
return (
105101
<BookList
106102
bookClasses={bookClasses}
@@ -117,7 +113,12 @@ function BibleBookList({
117113
title={el.title}
118114
/>
119115
);
120-
})}
116+
})
117+
118+
return (
119+
<>
120+
{checkboxRender}
121+
{bookListRender}
121122
</>
122123
);
123124
}

src/components/Book/Book.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Button from '@material-ui/core/Button';
33
import PropTypes from 'prop-types';
44

55
function Book({ isset, bookId, classes, className, isSelected, text, onClick }) {
6+
67
return (
78
<Button
89
className={className}

src/components/BookList/BookList.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ function BookList({
1212
onClickBook,
1313
showInactive,
1414
}) {
15-
return (
16-
<>
17-
<div className={bookListClasses?.title}>{title}</div>
18-
<Box className={bookListClasses?.bookList}>
19-
{bookList.map(
15+
16+
bookListRender = bookList.map(
2017
(el, index) =>
2118
(showInactive || el.isset) && (
2219
<Book
@@ -30,7 +27,13 @@ function BookList({
3027
text={el.text}
3128
/>
3229
)
33-
)}
30+
)
31+
32+
return (
33+
<>
34+
<div className={bookListClasses?.title}>{title}</div>
35+
<Box className={bookListClasses?.bookList}>
36+
{bookListRender}
3437
</Box>
3538
</>
3639
);

src/components/Chapter/Chapter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Button from '@material-ui/core/Button';
33
import PropTypes from 'prop-types';
44

55
function Chapter({ isSelected, classes, className, chapterId, chapterPrefix, onClick }) {
6+
67
return (
78
<Button
89
className={className}

src/components/ChapterList/ChapterList.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ function ChapterList({
1111
selectedChapter,
1212
onClickChapter,
1313
}) {
14-
return (
15-
<Box className={chapterListClasses?.chapterList}>
16-
{chapterList.map((el, index) => (
14+
chapterListRender = chapterList.map((el, index) => (
1715
<Chapter
1816
chapterId={el}
1917
chapterPrefix={chapterPrefix}
@@ -23,7 +21,11 @@ function ChapterList({
2321
key={index}
2422
onClick={onClickChapter}
2523
/>
26-
))}
24+
))
25+
26+
return (
27+
<Box className={chapterListClasses?.chapterList}>
28+
{chapterListRender}
2729
</Box>
2830
);
2931
}

0 commit comments

Comments
 (0)