update navigation design

This commit is contained in:
Ren Amamiya
2023-05-02 21:23:00 +07:00
parent 90bcabf27b
commit e86cd16ba4
15 changed files with 134 additions and 152 deletions

View File

@@ -1,4 +1,3 @@
import { DEFAULT_AVATAR } from '@lume/stores/constants';
import { useChannelProfile } from '@lume/utils/hooks/useChannelProfile';
import { usePageContext } from '@lume/utils/hooks/usePageContext';
@@ -15,19 +14,15 @@ export default function ChannelsListItem({ data }: { data: any }) {
<a
href={`/app/channel?id=${data.event_id}&pubkey=${data.pubkey}`}
className={twMerge(
'inline-flex items-center gap-2 rounded-md px-2.5 py-1.5 hover:bg-zinc-900',
'group inline-flex h-8 items-center gap-2.5 rounded-md px-2.5 hover:bg-zinc-900',
pageID === data.event_id ? 'dark:bg-zinc-900 dark:text-zinc-100 hover:dark:bg-zinc-800' : ''
)}
>
<div className="relative h-5 w-5 shrink-0 rounded">
<img
src={channel?.picture || DEFAULT_AVATAR}
alt={data.event_id}
className="h-5 w-5 rounded bg-white object-cover"
/>
<div className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900 group-hover:bg-zinc-800">
<span className="text-xs text-zinc-200">#</span>
</div>
<div>
<h5 className="truncate text-sm font-medium text-zinc-400">{channel?.name}</h5>
<h5 className="truncate text-[13px] font-semibold text-zinc-400">{channel?.name}</h5>
</div>
</a>
);