fix: avatar in session
This commit is contained in:
@@ -40,8 +40,8 @@ const Session: FC<IProps> = ({ id, mid }) => {
|
||||
return (
|
||||
<li className="session">
|
||||
<NavLink className={({ isActive: linkActive }) => clsx(`nav flex gap-2 rounded-lg p-2 w-full md:hover:bg-gray-500/20`, linkActive && "bg-gray-500/20")} to={`/chat/channel/${id}`}>
|
||||
<div className="flex shrink-0 w-10 h-10 bg-slate-50 rounded-full overflow-hidden">
|
||||
<Avatar width={40} height={40} className="icon" type="channel" name={name} src={icon} />
|
||||
<div className="flex shrink-0">
|
||||
<Avatar width={40} height={40} className="icon rounded-full" type="channel" name={name} src={icon} />
|
||||
</div>
|
||||
<div className="w-full flex flex-col justify-between">
|
||||
<div className="flex items-center justify-between">
|
||||
|
||||
@@ -42,7 +42,7 @@ const SessionList: FC<Props> = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<ul className="flex flex-col gap-0.5 p-2 overflow-auto h-[calc(100vh_-_56px_-_38px)]">
|
||||
<ul className="flex-1 flex flex-col gap-0.5 p-2 overflow-auto">
|
||||
{sessions.map((s) => {
|
||||
const { key, id, mid = 0 } = s;
|
||||
return <Session key={key} id={id} mid={mid} />;
|
||||
|
||||
@@ -113,14 +113,14 @@ const Session: FC<IProps> = ({
|
||||
to={type == "user" ? `/chat/dm/${id}` : `/chat/channel/${id}`}
|
||||
onContextMenu={handleContextMenuEvent}
|
||||
>
|
||||
<div className="flex shrink-0 w-10 h-10 bg-slate-50 rounded-full overflow-hidden">
|
||||
<div className="flex shrink-0">
|
||||
{type == "user" ? (
|
||||
<User avatarSize={40} compact interactive={false} uid={id} />
|
||||
) : (
|
||||
<Avatar
|
||||
width={40}
|
||||
height={40}
|
||||
className="icon"
|
||||
className="icon rounded-full"
|
||||
type="channel"
|
||||
name={name}
|
||||
src={icon}
|
||||
|
||||
Reference in New Issue
Block a user