import classNames from 'classnames' import Link from 'next/link' import { useRouter } from 'next/router' import { CogIcon } from '@heroicons/react/solid' import { GuildsChannelsPath } from '../../Application' import { Channel as ChannelType } from '../../../../models/Channel' import { useGuildMember } from '../../../../contexts/GuildMember' import { IconButton } from '../../../design/IconButton' export interface ChannelProps { path: GuildsChannelsPath channel: ChannelType selected?: boolean } export const Channel: React.FC = (props) => { const { channel, path, selected = false } = props const router = useRouter() const { member } = useGuildMember() return ( # {channel.name} {member.isOwner && ( { await router.push( `/application/${channel.guildId}/${channel.id}/settings` ) }} className='bg-unherit absolute -right-10 h-full w-8 transition-all group-hover:right-0 group-hover:shadow-lg dark:group-hover:bg-gray-600' title='Settings' > )} ) }