refactor: enforce account page view model boundary

This commit is contained in:
2026-08-25 13:17:45 +03:00
parent fd72fb2239
commit fff36f252a
20 changed files with 912 additions and 428 deletions
@@ -0,0 +1,27 @@
import { Avatar } from "@mantine/core";
import { useState } from "react";
export function PositionLogo({
src,
label,
}: {
src: string | null;
label: string;
}) {
const [failed, setFailed] = useState(false);
if (src && !failed)
return (
<Avatar
src={src}
alt={label}
size={40}
radius="md"
onError={() => setFailed(true)}
/>
);
return (
<Avatar size={40} radius="md">
{(label.trim()[0] ?? "?").toUpperCase()}
</Avatar>
);
}