From bb099de72659a652433329c9c4ce43da089c098b Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Thu, 8 Sep 2022 21:41:37 +0800 Subject: [PATCH] feat: only admin can have edit channel entrance --- src/routes/chat/ChannelChat/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/routes/chat/ChannelChat/index.tsx b/src/routes/chat/ChannelChat/index.tsx index 9b38d8d3..774616c7 100644 --- a/src/routes/chat/ChannelChat/index.tsx +++ b/src/routes/chat/ChannelChat/index.tsx @@ -188,10 +188,12 @@ function ChannelChat({ cid = 0, dropFiles = [] }: Props) {

Welcome to #{name} !

This is the start of the #{name} channel.

- - - Edit Channel - + {loginUser?.is_admin && ( + + + Edit Channel + + )}
)} {/*
*/}