File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed
global/components/Annotation/Annotation/TextContent/FromNodes Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ import { useFromStore } from "hooks";
1010export default function AddCollaboratorContainer ( { projectId, refresh } ) {
1111 const { t } = useTranslation ( ) ;
1212 const { id } = useParams ( ) ;
13- const collaborator = useFromStore (
14- `entityStore.entities.flattenedCollaborators.${ id } `
15- ) ;
13+ const collaborator = useFromStore ( {
14+ path : `entityStore.entities.flattenedCollaborators.${ id } `
15+ } ) ;
1616
1717 return (
1818 < section >
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ import { useFromStore } from "hooks";
1010export default function AddCollaboratorContainer ( { textId, refresh } ) {
1111 const { t } = useTranslation ( ) ;
1212 const { id } = useParams ( ) ;
13- const collaborator = useFromStore (
14- `entityStore.entities.flattenedCollaborators.${ id } `
15- ) ;
13+ const collaborator = useFromStore ( {
14+ path : `entityStore.entities.flattenedCollaborators.${ id } `
15+ } ) ;
1616
1717 return (
1818 < section >
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ function AnnotationWithNodes({
2828 ) ;
2929
3030 const { sectionId } = useParams ( ) ;
31- const bodyJSON = useFromStore (
32- `entityStore.entities.textSections["${ sectionId } "].attributes.bodyJSON`
33- ) ;
31+ const bodyJSON = useFromStore ( {
32+ path : `entityStore.entities.textSections["${ sectionId } "].attributes.bodyJSON`
33+ } ) ;
3434
3535 const length = selection ?. replace ( "\n" , " " ) ?. length ;
3636 /* eslint-disable no-nested-ternary */
@@ -68,12 +68,12 @@ function AnnotationWithNodes({
6868 const nodesToRender =
6969 finalStack ?. children ?? finalStack ?. content ? [ finalStack ] : undefined ;
7070
71- const activeGroup = useFromStore (
72- `ui.persistent.reader.readingGroups.currentAnnotatingReadingGroup`
73- ) ;
74- const memberships = useFromStore (
75- `entityStore.entities.readingGroupMemberships`
76- ) ;
71+ const activeGroup = useFromStore ( {
72+ path : `ui.persistent.reader.readingGroups.currentAnnotatingReadingGroup`
73+ } ) ;
74+ const memberships = useFromStore ( {
75+ path : `entityStore.entities.readingGroupMemberships`
76+ } ) ;
7777 const membership =
7878 typeof memberships === "object"
7979 ? Object . keys ( memberships ) ?. find (
You can’t perform that action at this time.
0 commit comments