client/packages/call/src/views/preview.tsx
Alois 042141c781
Some checks failed
/ build-web (push) Successful in 4m1s
/ release (push) Has been cancelled
/ build-mobile (push) Has been cancelled
/ build-desktop (linux) (push) Has been cancelled
feat(user): rename to identity
feat(identity): add getIota function with caching
2026-08-30 19:26:42 +02:00

27 lines
826 B
TypeScript

import { useCall } from "../store";
import { useUserFields } from "@tensamin/identity/context";
const USER_FIELDS = ["Display"] as const;
function Participant({ userId }: { userId: number }) {
const { data: user } = useUserFields(userId, USER_FIELDS);
return user ? <p className="text-2xl">User: {user.Display}</p> : null;
}
export default function Preview() {
const currentCallData = useCall((state) => state.currentCallData);
return (
<div className="w-full h-full flex items-center justify-center">
{currentCallData?.exists ? (
<div className="flex flex-col gap-2">
{currentCallData.UserIds.map((userId) => (
<Participant key={userId} userId={userId} />
))}
</div>
) : (
<p className="text-2xl">Call expired</p>
)}
</div>
);
}