feat: migrate orgconfig model across the app

This commit is contained in:
swve 2024-08-10 16:53:59 +02:00
parent 6485b6e1bb
commit 28a2456d69
12 changed files with 467 additions and 363 deletions

View file

@ -17,7 +17,7 @@ function ActiveAvatars(props: ActiveAvatarsProps) {
/* Collaboration Features */
const collab = getCollaborationServerUrl()
const isCollabEnabledOnThisOrg = org?.config.config.GeneralConfig.collaboration && collab
const isCollabEnabledOnThisOrg = org?.config.config.features.collaboration.enabled && collab
// Get users from the mouseMovements object
useEffect(() => {

View file

@ -35,7 +35,7 @@ function EditorWrapper(props: EditorWrapperProps): JSX.Element {
/* Collaboration Features */
const collab = getCollaborationServerUrl()
const isCollabEnabledOnThisOrg = props.org.config.config.GeneralConfig.collaboration && collab
const isCollabEnabledOnThisOrg = props.org.config.config.features.collaboration.enabled && collab
const doc = new Y.Doc()
// mouse movement
const [mouseMovements, setMouseMovements] = useState({} as any);

View file

@ -27,7 +27,7 @@ function MouseMovements({ movements, onlinePageInstanceID, org }: MouseMovements
/* Collaboration config */
const collab = getCollaborationServerUrl()
const isCollabEnabledOnThisOrg = org?.config.config.GeneralConfig.collaboration && collab
const isCollabEnabledOnThisOrg = org?.config.config.features.collaboration.enabled && collab
useEffect(() => {