diff options
| author | Melissa Zhang <mzhang19096@gmail.com> | 2020-07-25 15:38:58 -0700 |
|---|---|---|
| committer | Melissa Zhang <mzhang19096@gmail.com> | 2020-07-25 15:38:58 -0700 |
| commit | b1308d059c78e516c6062e4dd6f92dd409cf17a7 (patch) | |
| tree | 69c83c46adfa55434606daa05636d9fe3ee2e642 /src/client/views/MainView.tsx | |
| parent | 5ca85299fc42e5881b313053cf6c6fd2df572e12 (diff) | |
search for source web doc when linkToDash is called
Diffstat (limited to 'src/client/views/MainView.tsx')
| -rw-r--r-- | src/client/views/MainView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 6d18b3177..605b81506 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -132,8 +132,8 @@ export class MainView extends React.Component { document.addEventListener("linkAnnotationToDash", async (e: any) => { // listen for event from Hypothes.is plugin to to link an existing annotation to Dash const annotationId = e.detail.id; const annotationUri = e.detail.uri; - console.log(annotationId, annotationUri); - // const source = await Hypothesis.getWebDoc(annotationUri); + const sourceDoc = await Hypothesis.getSourceWebDoc(annotationUri); + console.log("sourceDoc: ", sourceDoc ? sourceDoc.title : "not found"); const source = SelectionManager.SelectedDocuments()[0]; // TO BE FIXED, currently link just starts from whichever doc is selected runInAction(() => { |
