Skip to content

Commit

Permalink
refactor(examples): show avatar on uid available
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrious committed Mar 20, 2023
1 parent 1ffd458 commit 52ffcab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/mobx/src/components/Room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Room = observer(function Room() {

return (
<div style={{ padding: "8px 0", flex: 1, display: "flex", gap: 8 }}>
<LocalUser />
{appStore.uid && <LocalUser />}
{remoteUsers.map(user => (
<RemoteUser
key={user.uid}
Expand Down
4 changes: 2 additions & 2 deletions examples/overview/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ export const App = () => {
<AutoLayout.Item>
<CameraVideoTrack className="w-full h-full" track={videoTrack} play={cameraOn} />
<MicrophoneAudioTrack track={audioTrack} play={micOn} />
{!cameraOn && (
{!cameraOn && uid && (
<UserCover cover={userAvatar} className="w-full h-full absolute top-0 left-0" />
)}
<Label>{`${userName}{${uid}}`}</Label>
{uid && <Label>{`${userName}{${uid}}`}</Label>}
</AutoLayout.Item>
{remoteUsers.map(user => (
<AutoLayout.Item key={user.uid}>
Expand Down

0 comments on commit 52ffcab

Please sign in to comment.