(feat): move call context to zustand
(feat): add actions, basic call page
This commit is contained in:
parent
d01df7c02c
commit
413764f33e
17 changed files with 673 additions and 382 deletions
20
packages/call/src/components/top.tsx
Normal file
20
packages/call/src/components/top.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { useCall } from "../store";
|
||||
|
||||
export default function TopBar() {
|
||||
const room = useCall((state) => state.room);
|
||||
|
||||
const users = new Array(room.remoteParticipants.size).fill(0).map((_, i) => {
|
||||
const participant = Array.from(room.remoteParticipants.values())[i];
|
||||
return participant.identity;
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="w-full flex justify-between h-12">
|
||||
<div className="flex gap-1">
|
||||
{users.map((user) => (
|
||||
<div key={user}>{user}</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue