feat: useVoice

This commit is contained in:
Tristan Yang
2023-03-24 23:07:56 +08:00
parent da00f3b797
commit 92411d0468
20 changed files with 331 additions and 132 deletions
+21 -3
View File
@@ -1,10 +1,28 @@
import React from 'react';
import { VoiceInfo } from '../../../app/slices/voice';
import { useAppSelector } from '../../../app/store';
import User from '../../../common/component/User';
type Props = {}
type Props = {
info: VoiceInfo | null
}
const VoiceManagement = (props: Props) => {
const VoiceManagement = ({ info }: Props) => {
const userData = useAppSelector(store => store.users.byId);
if (!info) return null;
const { context, id, members } = info;
return (
<div>VoiceManagement</div>
<div>
<ul>
{members.map((uid) => {
return <li key={uid}>
<User uid={uid} interactive={false} />
{/* {userData[uid]?.name} */}
</li>;
})}
</ul>
</div>
);
};