Skip to content

Commit

Permalink
fix(mobile): disabled channel settings for open/dm channel + removed log
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshkurunkar7 committed Mar 29, 2024
1 parent ac1587b commit fd08db0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 7 additions & 6 deletions mobile/src/components/features/chat-space/ChatInterface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,29 +99,30 @@ export const ChatInterface = ({ channel }: { channel: ChannelListItem | DMChanne
return []
}, [channelMembers])

const checkIsOpenChannel = () => (channel.type !== 'Open' && !channel.is_direct_message)
const checkIsNotOpenChannel = () => (channel.type !== 'Open' && !channel.is_direct_message)

return (
<>
<IonHeader>
<div className='px-2 py-2 inset-x-0 top-0 overflow-hidden min-h-5 bg-background border-b-foreground/10 border-b'>
<div className='flex gap-2 items-center'>
<div className='flex items-center'>
<IonBackButton color="dark" text="" className='back-button'/>
<IonBackButton color="dark" text="" className='back-button' />
</div>
<div className='flex items-center justify-between gap-2 w-full'>
<div className='grow p-1'>
{
checkIsOpenChannel() ?
<ChatHeader channel={channel} /> :
checkIsNotOpenChannel() ?
<Link to={`${channel.name}/channel-settings`}>
<ChatHeader channel={channel} />
</Link>
</Link> :
<ChatHeader channel={channel} />

}
</div>
{/* TO-DO: Add Other optional buttons here later */}
<div hidden aria-hidden>
<IconButton variant="ghost" icon={BsThreeDotsVertical} className='active:bg-accent'/>
<IconButton variant="ghost" icon={BsThreeDotsVertical} className='active:bg-accent' />
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion mobile/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export interface InputProps
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {

console.log("props", props)
return (
<input
type={type}
Expand Down

0 comments on commit fd08db0

Please sign in to comment.