refac: hide channel add button for users

This commit is contained in:
Timothy Jaeryang Baek 2025-11-27 04:49:29 -05:00
parent 09b6ea38c5
commit 421aba7cd7

View file

@ -914,15 +914,15 @@
name={$i18n.t('Channels')}
chevron={false}
dragAndDrop={false}
onAdd={async () => {
if ($user?.role === 'admin') {
await tick();
onAdd={$user?.role === 'admin'
? async () => {
await tick();
setTimeout(() => {
showCreateChannel = true;
}, 0);
}
}}
setTimeout(() => {
showCreateChannel = true;
}, 0);
}
: null}
onAddLabel={$i18n.t('Create Channel')}
>
{#each $channels as channel}