refac: hide channel add button for users
This commit is contained in:
@@ -914,15 +914,15 @@
|
|||||||
name={$i18n.t('Channels')}
|
name={$i18n.t('Channels')}
|
||||||
chevron={false}
|
chevron={false}
|
||||||
dragAndDrop={false}
|
dragAndDrop={false}
|
||||||
onAdd={async () => {
|
onAdd={$user?.role === 'admin'
|
||||||
if ($user?.role === 'admin') {
|
? async () => {
|
||||||
await tick();
|
await tick();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showCreateChannel = true;
|
showCreateChannel = true;
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
}}
|
: null}
|
||||||
onAddLabel={$i18n.t('Create Channel')}
|
onAddLabel={$i18n.t('Create Channel')}
|
||||||
>
|
>
|
||||||
{#each $channels as channel}
|
{#each $channels as channel}
|
||||||
|
|||||||
Reference in New Issue
Block a user