Skip to content

Commit 5eef36b

Browse files
authored
Merge pull request #31 from texttree/develop
Develop
2 parents 72f9132 + 73e6384 commit 5eef36b

4 files changed

Lines changed: 48 additions & 55 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@texttree/tt-reference-rcl",
33
"author": "TextTree.org",
4-
"version": "1.0.1",
4+
"version": "1.1.1",
55
"description": "This library of components was made as part of the development of the Bible Study App and helps to display books and chapters from the books of the Bible.",
66
"keywords": [
77
"bible",

src/components/BibleBookList/BibleBookList.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function BibleBookList({
111111
title: titleOBS,
112112
bookList: currentBookListOBS,
113113
});
114-
if (showCheckbox) {
114+
if (!showCheckbox) {
115115
showCheckbox = allBooksIsSet(currentBookListOBS);
116116
}
117117
}
@@ -127,24 +127,24 @@ function BibleBookList({
127127
) : (
128128
''
129129
);
130-
const bookListRender = testamentList.map((el, index) => {
131-
return (
132-
<BookList
133-
bookClasses={bookClasses}
134-
bookList={el.bookList}
135-
bookListClasses={{
136-
title: BibleBookListClasses?.title,
137-
book: BibleBookListClasses?.book,
138-
bookList: BibleBookListClasses?.bookList,
139-
}}
140-
key={index}
141-
onClickBook={onClickBook}
142-
selectedBookId={selectedBookId}
143-
showInactive={!checkState}
144-
title={el.title}
145-
/>
146-
);
147-
})
130+
const bookListRender = testamentList.map((el, index) => {
131+
return (
132+
<BookList
133+
bookClasses={bookClasses}
134+
bookList={el.bookList}
135+
bookListClasses={{
136+
title: BibleBookListClasses?.title,
137+
book: BibleBookListClasses?.book,
138+
bookList: BibleBookListClasses?.bookList,
139+
}}
140+
key={index}
141+
onClickBook={onClickBook}
142+
selectedBookId={selectedBookId}
143+
showInactive={!checkState}
144+
title={el.title}
145+
/>
146+
);
147+
});
148148

149149
return (
150150
<>

src/components/BookList/BookList.js

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,26 @@ function BookList({
1212
onClickBook,
1313
showInactive,
1414
}) {
15-
16-
bookListRender = bookList.map(
17-
(el, index) =>
18-
(showInactive || el.isset) && (
19-
<Book
20-
bookId={el.identifier}
21-
className={bookListClasses?.book}
22-
classes={bookClasses}
23-
isSelected={selectedBookId == el.identifier}
24-
isset={el.isset}
25-
key={index}
26-
onClick={onClickBook}
27-
text={el.text}
28-
/>
29-
)
30-
)
15+
const bookListRender = bookList.map(
16+
(el, index) =>
17+
(showInactive || el.isset) && (
18+
<Book
19+
bookId={el.identifier}
20+
className={bookListClasses?.book}
21+
classes={bookClasses}
22+
isSelected={selectedBookId == el.identifier}
23+
isset={el.isset}
24+
key={index}
25+
onClick={onClickBook}
26+
text={el.text}
27+
/>
28+
)
29+
);
3130

3231
return (
3332
<>
3433
<div className={bookListClasses?.title}>{title}</div>
35-
<Box className={bookListClasses?.bookList}>
36-
{bookListRender}
37-
</Box>
34+
<Box className={bookListClasses?.bookList}>{bookListRender}</Box>
3835
</>
3936
);
4037
}

src/components/ChapterList/ChapterList.js

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,19 @@ function ChapterList({
1111
selectedChapter,
1212
onClickChapter,
1313
}) {
14-
chapterListRender = chapterList.map((el, index) => (
15-
<Chapter
16-
chapterId={el}
17-
chapterPrefix={chapterPrefix}
18-
className={chapterListClasses?.chapter}
19-
classes={chapterClasses}
20-
isSelected={String(selectedChapter) === String(el)}
21-
key={index}
22-
onClick={onClickChapter}
23-
/>
24-
))
14+
const chapterListRender = chapterList.map((el, index) => (
15+
<Chapter
16+
chapterId={el}
17+
chapterPrefix={chapterPrefix}
18+
className={chapterListClasses?.chapter}
19+
classes={chapterClasses}
20+
isSelected={String(selectedChapter) === String(el)}
21+
key={index}
22+
onClick={onClickChapter}
23+
/>
24+
));
2525

26-
return (
27-
<Box className={chapterListClasses?.chapterList}>
28-
{chapterListRender}
29-
</Box>
30-
);
26+
return <Box className={chapterListClasses?.chapterList}>{chapterListRender}</Box>;
3127
}
3228

3329
ChapterList.defaultProps = {

0 commit comments

Comments
 (0)