fix: avatar in session

This commit is contained in:
Tristan Yang
2023-03-02 10:30:04 +08:00
parent 4c1018dc46
commit b7314d7bfe
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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">
+1 -1
View File
@@ -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} />;
+2 -2
View File
@@ -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}