Skip to content

Commit

Permalink
Processed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfheij-sil committed Oct 16, 2023
1 parent 4636e50 commit 7fd2248
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src/renderer/components/basic-list/basic-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,29 @@ import './basic-list.component.scss';

export const TAB_TYPE_BASIC_LIST = 'basic-list';

type checkResult = {
type CheckResult = {
book: string;
chapter?: number;
verse?: number;
issueDescription: string;
subRows?: checkResult[];
subRows?: CheckResult[];
};

const newCheckResult = (bookId: string): checkResult => {
return {
book: Canon.bookIdToEnglishName(bookId),
chapter: faker.number.int(40),
verse: faker.number.int(40),
issueDescription: 'Basic check issue description',
};
};
const newCheckResult = (bookId: string): CheckResult => ({
book: Canon.bookIdToEnglishName(bookId),
chapter: faker.number.int(40),
verse: faker.number.int(40),
issueDescription: 'Basic check issue description',
});

export function makeMockCheckResults() {
const { allBookIds } = Canon;
return allBookIds.map((bookId) => {
function makeMockCheckResults() {
return Canon.allBookIds.map((bookId) => {
const numberOfIssues: number = faker.number.int({ min: 1, max: 10 });
const bookResults: checkResult = {
const bookResults: CheckResult = {
book: Canon.bookIdToEnglishName(bookId),
issueDescription: `${numberOfIssues} issues`,
};
const subResults: checkResult[] = [];
const subResults: CheckResult[] = [];
for (let i = 0; i < numberOfIssues; i++) {
subResults.push(newCheckResult(bookId));
}
Expand All @@ -49,7 +46,7 @@ export function makeMockCheckResults() {
});
}

const columns: ColumnDef<checkResult>[] = [
const columns: ColumnDef<CheckResult>[] = [
{
header: 'Scripture reference',
columns: [
Expand Down

0 comments on commit 7fd2248

Please sign in to comment.