AnnotationList.tsx 642 B

123456789101112131415161718192021222324252627282930
  1. import React from 'react';
  2. import useStore from '../store';
  3. import useActions from '../actions';
  4. import AnnotationListComp from '../components/AnnotationList';
  5. const AnnotationList: React.FunctionComponent = () => {
  6. const [{
  7. navbarState,
  8. annotations,
  9. viewport,
  10. scale,
  11. pdf,
  12. }, dispatch] = useStore();
  13. const { setNavbar } = useActions(dispatch);
  14. return (
  15. <AnnotationListComp
  16. annotations={annotations}
  17. viewport={viewport}
  18. scale={scale}
  19. pdf={pdf}
  20. isActive={navbarState === 'annotations'}
  21. close={(): void => { setNavbar(''); }}
  22. />
  23. );
  24. };
  25. export default AnnotationList;