Skip to content

Commit 4d0edd7

Browse files
committed
Exclude host from connection scope
1 parent 1ccfd22 commit 4d0edd7

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

src/lib/scopes/connectionScope.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,22 @@ export function ConnectionScopeProviderWithConnectionsPlayersProvider({
4141

4242
return (
4343
<>
44-
{connections.map((connection) => (
45-
<ScopeProvider
46-
key={connection.UCID}
47-
scope={ConnectionScope}
48-
value={connection}
49-
>
50-
{children}
51-
</ScopeProvider>
52-
))}
44+
{connections.map((connection) => {
45+
// Do not show buttons for host
46+
if (connection.UCID === 0) {
47+
return null;
48+
}
49+
50+
return (
51+
<ScopeProvider
52+
key={connection.UCID}
53+
scope={ConnectionScope}
54+
value={connection}
55+
>
56+
{children}
57+
</ScopeProvider>
58+
);
59+
})}
5360
</>
5461
);
5562
}

0 commit comments

Comments
 (0)