Skip to content

Commit

Permalink
issue #660: Adaptation to enable article displayed in V3
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-reis committed Oct 31, 2024
1 parent 80de13e commit a090d16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/pages/ArticleViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const ArticleViewer = ({
doi={article.doi}
issue={article.issue}
bibjson={article.citation}
parserVersion={parseInt(article.data.parserVersion) || 2}
isJavascriptTrusted
match={{
params: {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/NotebookViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ const NotebookViewer = ({
bibjson,
pid,
isJavascriptTrusted,
parserVersion = 2
}) => {
const [{ [ArticleVersionQueryParam]: version }] = useQueryParams({
[ArticleVersionQueryParam]: withDefault(NumberParam, 2),
[ArticleVersionQueryParam]: withDefault(NumberParam, parserVersion),
})
const ArticleComponent = version === 3 ? ArticleV3 : version === 2 ? ArticleV2 : Article
const setLoadingProgress = usePropsStore((state) => state.setLoadingProgress)
Expand Down

0 comments on commit a090d16

Please sign in to comment.