Skip to content
Merged
Show file tree
Hide file tree
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
310 changes: 0 additions & 310 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022-2023 TextTree
Copyright (c) 2022-2024 Glokas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
165 changes: 0 additions & 165 deletions __tests__/api/users.test.js

This file was deleted.

63 changes: 63 additions & 0 deletions __tests__/helper/countOfChaptersAndVerses.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { calculateChaptersAndVerses } from '../../utils/helper'
import usfmData3JN from '../../mocks/65-3JN'
import multiChapterData from '../../mocks/13-1CH'

describe('calculateChaptersAndVerses', () => {
test('should return correct verse counts for each chapter', () => {
const result = calculateChaptersAndVerses(usfmData3JN)

expect(result).toEqual({
data: {
1: 15,
},
error: null,
})
})
test('should return correct verse counts for multiple chapters', () => {
const result = calculateChaptersAndVerses(multiChapterData)

expect(result).toEqual({
data: {
'1': 54,
'2': 55,
'3': 24,
'4': 43,
'5': 26,
'6': 81,
'7': 40,
'8': 40,
'9': 44,
'10': 14,
'11': 47,
'12': 40,
'13': 14,
'14': 17,
'15': 29,
'16': 43,
'17': 27,
'18': 17,
'19': 19,
'20': 8,
'21': 30,
'22': 19,
'23': 32,
'24': 31,
'25': 31,
'26': 32,
'27': 34,
'28': 21,
'29': 30,
},
error: null,
})
})

test('should return an object for empty data', () => {
const result = calculateChaptersAndVerses('')

expect(result).toEqual({
data: {},
error: null,
})
})
})
2 changes: 1 addition & 1 deletion components/Panel/Helpers/CommandEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function CommandEditor({ config }) {
<>
{verseObjects.map((verseObject, index) => (
<div
id={'commandTranslate' + verseObject.num}
id={`commandTranslate_${verseObject.num}`}
key={verseObject.verse_id}
className="flex my-3"
dir={config?.isRtl ? 'rtl' : 'ltr'}
Expand Down
2 changes: 1 addition & 1 deletion components/Panel/Helpers/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function Editor({ config }) {
{verseObjects.map((verseObject, index) => (
<div
key={verseObject.verse_id}
id={'translate' + verseObject.num}
id={`translate_${verseObject.num}`}
className="flex my-3 pt-1"
dir={config?.isRtl ? 'rtl' : 'ltr'}
>
Expand Down
2 changes: 1 addition & 1 deletion components/Panel/Helpers/PersonalNotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function PersonalNotes({ config }) {
'px-5 leading-[47px] text-lg cursor-pointer rounded-lg bg-th-secondary-100 hover:bg-th-secondary-200 ltr:flex',
nodeTextBlock: 'items-center truncate',
}}
data={dataForTreeView}
data={dataForTreeView || []}
setSelectedNodeId={setNoteId}
selectedNodeId={noteId}
treeWidth={'w-full'}
Expand Down
2 changes: 1 addition & 1 deletion components/Panel/Helpers/TeamNotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ function TeamNotes({ config }) {
'px-5 leading-[47px] text-lg cursor-pointer rounded-lg bg-th-secondary-100 hover:bg-th-secondary-200 ltr:flex',
nodeTextBlock: 'items-center truncate',
}}
data={dataForTreeView}
data={dataForTreeView || []}
setSelectedNodeId={setNoteId}
selectedNodeId={noteId}
treeWidth="w-full"
Expand Down
Loading