grungnet/src/components/Party.js
nicola 8989268094 Add join functionality to party
co-author-by: mitchemmc <mitchemmc@gmail.com>
2020-03-19 18:56:42 +11:00

24 lines
581 B
JavaScript

import React from "react";
import { Flex } from "theme-ui";
import PartyVideo from "./PartyVideo";
import AddPartyMemberButton from "./AddPartyMemberButton";
function Party({ streams, localStreamId }) {
return (
<Flex
p={3}
bg="background"
sx={{ flexDirection: "column", width: "192px", minWidth: "192px" }}
>
{Object.entries(streams).map(([id, stream]) => (
<PartyVideo key={id} stream={stream} muted={id === localStreamId} />
))}
<AddPartyMemberButton streamId={localStreamId} />
</Flex>
);
}
export default Party;