refactor: add user name overflow behavior

This commit is contained in:
moonrailgun 2024-06-08 15:54:47 +08:00
parent 1c98cf5c7d
commit 27aa22077a

View File

@ -61,10 +61,14 @@ export const UserConfig: React.FC<UserConfigProps> = React.memo((props) => {
</Avatar>
);
const name = <div className="flex-1">{userInfo?.username ?? ''}</div>;
const name = (
<div className="flex-1 overflow-hidden text-ellipsis">
{userInfo?.username ?? ''}
</div>
);
const more = (
<Button variant="outline" size="icon">
<Button variant="outline" size="icon" className="shrink-0">
<LuMoreVertical />
</Button>
);