v1.3.0-beta/voice call implemented

This commit is contained in:
2020-05-31 18:14:19 -04:00
parent aa15c4eb30
commit 5428c1e299
12 changed files with 256 additions and 97 deletions
+5 -13
View File
@@ -1,29 +1,20 @@
import React from 'react';
import { Typography } from '@material-ui/core';
import './Thread.css';
import { LocalData } from './Api';
const Thread = (props) =>
props.messages.map((m, midx) => {
const userUid = window.localStorage.getItem('watchPartyUserUid');
const { userUid } = LocalData();
if (m.uid === '<system>') {
if (m.name === '<alert>') {
return (
<Typography
variant="body2"
className="thread-item system-message alert"
key={m.id}
disabled
>
{m.text}
</Typography>
);
}
// SYSTEM MESSAGES
return (
<Typography variant="body2" className="thread-item system-message" key={m.id} disabled>
{m.text}
</Typography>
);
} else if (m.uid === userUid) {
// OWN MESSAGE
return (
<div
className={`thread-item ${
@@ -42,6 +33,7 @@ const Thread = (props) =>
</div>
);
} else {
// OTHER USER MESSAGE
return (
<div
className={`thread-item ${