Skip to content

Commit

Permalink
added fix for infinite loading
Browse files Browse the repository at this point in the history
  • Loading branch information
sijumoncy committed Jan 5, 2024
1 parent 0db210e commit 9d2176e
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export default function TranslationHelpsCard({
};
}).filter((data) => data.Chapter === chapter && data.Verse === verse);
setOfflineItemsDisable(false);
console.log({ json });

Check warning on line 108 in renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement

Check warning on line 108 in renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement
setOfflineItems(json);
}
}
Expand Down Expand Up @@ -178,7 +179,7 @@ export default function TranslationHelpsCard({
setOfflineItemsDisable(true);
setOfflineMarkdown(filecontent);
} else {
setOfflineMarkdown('');
setOfflineMarkdown({ error: true, data: 'No Content Avaialble' });
}
}
});
Expand All @@ -192,6 +193,8 @@ export default function TranslationHelpsCard({
const filecontent = fs.readFileSync(path.join(folder, projectName, projectId, filePath), 'utf8');
setOfflineItemsDisable(true);
setOfflineMarkdown(filecontent);
} else {
setOfflineMarkdown({ error: true, data: 'No Content Available' });
}
break;

Expand All @@ -202,6 +205,8 @@ export default function TranslationHelpsCard({
const filecontent = fs.readFileSync(path.join(folder, projectName, 'bible', filePath), 'utf8');
setOfflineItemsDisable(true);
setOfflineMarkdown(filecontent);
} else {
setOfflineMarkdown({ error: true, data: 'No Content Available' });
}
break;

Expand All @@ -221,6 +226,10 @@ export default function TranslationHelpsCard({
items = !offlineItemsDisable && offlineResource?.offline ? offlineItems : items;
markdown = offlineResource?.offline ? offlineMarkdown : markdown;

console.log({

Check warning on line 229 in renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement

Check warning on line 229 in renderer/src/components/EditorPage/Reference/TranslationHelpsCard.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement
markdown, isLoading, items, offlineMarkdown, offlineItems,
});

return (
(markdown || items) ? (
<ReferenceCard
Expand Down

0 comments on commit 9d2176e

Please sign in to comment.