Skip to content

Commit

Permalink
added popout to users in viewer section
Browse files Browse the repository at this point in the history
  • Loading branch information
GypsyDangerous committed Jul 30, 2020
1 parent 65a48ba commit 9a44ffe
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/Viewers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ import Loader from "react-loader";
const ViewerTab = props => {};

const ViewerCard = props => {
return <div className="viewer-card">{props.login}</div>;
return (
<div>
<a href={`https://www.twitch.tv/popout/${props.streamer}/viewercard/${props.login}?popout=`} className="viewer-card">
{props.login}
</a>
</div>
);
};

const Viewers = ({chatterInfo, chatterCount} )=> {

const Viewers = ({ chatterInfo, chatterCount }) => {
const [tab, setTab] = useState("twitch");
const { setShowViewers } = useContext(AppContext);

const currentUser = firebase.auth.currentUser;

return (
<main className="viewer-body">
Expand Down Expand Up @@ -51,7 +56,7 @@ const Viewers = ({chatterInfo, chatterCount} )=> {
<div className="viewer-type">
<h2 className="viewer-type--header">{key}</h2>
{value.map(user => (
<ViewerCard {...user}></ViewerCard>
<ViewerCard streamer={currentUser?.displayName?.toLowerCase?.()} {...user}></ViewerCard>
))}
</div>
);
Expand Down

0 comments on commit 9a44ffe

Please sign in to comment.