diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-03-22 17:46:39 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-03-22 17:46:39 -0400 |
commit | f80f5c69fc538b8f8614bfab600e4b82236bb096 (patch) | |
tree | 01d144f63d3a215fbbc9731172da1013648a0e83 /src/client/util/CaptureManager.tsx | |
parent | 4265feca9e63cad6067055497ecabd354ead84f4 (diff) | |
parent | 2a4e86be98ad0f8d4aa4cb09b982d448b542d916 (diff) |
Merge branch 'master' into collaboration-sarah
Diffstat (limited to 'src/client/util/CaptureManager.tsx')
-rw-r--r-- | src/client/util/CaptureManager.tsx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/client/util/CaptureManager.tsx b/src/client/util/CaptureManager.tsx index 735b06f6d..c9fcc84a3 100644 --- a/src/client/util/CaptureManager.tsx +++ b/src/client/util/CaptureManager.tsx @@ -2,12 +2,13 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { action, computed, observable } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; -import { Doc, DocListCast } from '../../fields/Doc'; -import { StrCast } from '../../fields/Types'; +import { Doc } from '../../fields/Doc'; +import { DocCast, StrCast } from '../../fields/Types'; import { addStyleSheet } from '../../Utils'; import { LightboxView } from '../views/LightboxView'; import { MainViewModal } from '../views/MainViewModal'; import './CaptureManager.scss'; +import { LinkManager } from './LinkManager'; import { SelectionManager } from './SelectionManager'; @observer @@ -48,16 +49,14 @@ export class CaptureManager extends React.Component<{}> { const doc = this._document; const order: JSX.Element[] = []; if (doc) { - DocListCast(doc.links).forEach((l, i) => { - if (l) { - order.push( - <div className="list-item"> - <div className="number">{i}</div> - {StrCast((l.anchor1 as Doc).title)} - </div> - ); - } - }); + LinkManager.Links(doc).forEach((l, i) => + order.push( + <div className="list-item"> + <div className="number">{i}</div> + {StrCast(DocCast(l.anchor1)?.title)} + </div> + ) + ); } return ( |