mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 02:12:38 +01:00
prevent trying to render channels when missing view permission
This commit is contained in:
parent
9a9819cc51
commit
85ab5387c6
@ -114,6 +114,22 @@ function Chat() {
|
||||
);
|
||||
}
|
||||
|
||||
if (!activeChannel.hasPermission("VIEW_CHANNEL")) {
|
||||
return (
|
||||
<WrapperTwo>
|
||||
<span
|
||||
style={{
|
||||
color: "var(--text-secondary)",
|
||||
fontSize: "1.5rem",
|
||||
margin: "auto",
|
||||
}}
|
||||
>
|
||||
You do not have permission to view this channel
|
||||
</span>
|
||||
</WrapperTwo>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<WrapperTwo>
|
||||
<ChatHeader channel={activeChannel} />
|
||||
|
Loading…
Reference in New Issue
Block a user