Skip to content

Commit

Permalink
feat(spa): fix crossref demo in the Explorer (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
ships authored Dec 19, 2023
1 parent 3be5aef commit e48f8b2
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 29 deletions.
4 changes: 2 additions & 2 deletions packages/etl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
],
"dependencies": {
"@commander-js/extra-typings": "^11.0.0",
"commander": "^11.0.0",
"crossref-openapi-client-ts": "^1.3.0",
"@docmaps/sdk": "workspace:^0.0.0",
"commander": "^11.0.0",
"crossref-openapi-client-ts": "^1.5.0",
"fp-ts": "^2.14.0",
"tsx": "^4.0.0",
"typescript-collections": "^1.3.3"
Expand Down
26 changes: 12 additions & 14 deletions packages/spa/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@
key += 1;
showContent = true;
// // Once we've fixed the crossref client, we can uncomment this
// await configureForDoiString(
// doi,
// handleData,
// handleError,
// );
await configureForDoiString(
doi,
handleData,
handleError,
);
}
function displayWidgetWithDocmapLiteral() {
Expand All @@ -90,7 +89,7 @@
source: {
preset: 'crossref-api',
client: CreateCrossrefClient({
politeMailto: '[email protected]',
bePolite: false
}),
},
publisher: {
Expand Down Expand Up @@ -132,13 +131,12 @@
show: true, // Always show the widget
props: { doi: requestedDoi, docmap },
},
// // Once we've fixed the crossref client, we can uncomment this
// {
// name: 'Crossref Demo',
// component: CrossrefDemo,
// show: !providingPlaintextDocmap, // Only show the crossref demo when we're not providing a docmap via plaintext
// props: { json },
// },
{
name: 'Crossref Demo',
component: CrossrefDemo,
show: !providingPlaintextDocmap, // Only show the crossref demo when we're not providing a docmap via plaintext
props: { json },
},
];
$: if (typeof requestedDoi !== 'undefined' && requestedDoi) {
Expand Down
67 changes: 54 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e48f8b2

Please sign in to comment.