mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add live users avatar indicators
This commit is contained in:
parent
54718d7111
commit
6a47202c78
5 changed files with 100 additions and 15 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { m, motion } from "framer-motion";
|
||||
import React from 'react'
|
||||
import { getCollaborationServerUrl } from "@services/config/config";
|
||||
import { motion } from "framer-motion";
|
||||
import React, { useEffect } from 'react'
|
||||
|
||||
interface User {
|
||||
user_uuid: string;
|
||||
|
|
@ -18,12 +19,24 @@ interface Movement {
|
|||
interface MouseMovementsProps {
|
||||
movements: Record<string, Movement>;
|
||||
onlinePageInstanceID: string;
|
||||
org ?: any;
|
||||
}
|
||||
|
||||
function MouseMovements({ movements, onlinePageInstanceID }: MouseMovementsProps): JSX.Element {
|
||||
function MouseMovements({ movements, onlinePageInstanceID, org }: MouseMovementsProps): JSX.Element {
|
||||
|
||||
|
||||
/* Collaboration config */
|
||||
const collab = getCollaborationServerUrl()
|
||||
const isCollabEnabledOnThisOrg = org?.config.config.GeneralConfig.collaboration && collab
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
}
|
||||
, [movements, org]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
{Object.keys(movements).map((key) => (
|
||||
{isCollabEnabledOnThisOrg && Object.keys(movements).map((key) => (
|
||||
movements[key].onlinePageInstanceID !== onlinePageInstanceID && (<motion.div
|
||||
key={key}
|
||||
className="flex -space-x-2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue