mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-29 06:28:23 +02:00
- Create NavigationAdapter interface (push, replace, back, pathname, searchParams) - Create AppLink component replacing next/link in 4 files - Replace useRouter → useNavigation in 3 files (issue-detail, create-issue, create-workspace) - Create WebNavigationProvider wrapping Next.js useRouter/usePathname/useSearchParams - Move ~85 feature UI files (issues, editor, modals, my-issues, skills, runtimes) to packages/views/ - Add store singleton registration pattern (registerAuthStore, registerWorkspaceStore) - Create data-aware wrappers in packages/views/common/ (ActorAvatar, Markdown) - Update all app-layer imports to @multica/views/* - Add @source directive for Tailwind to scan views package - packages/views/ has zero next/* imports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
691 B
TypeScript
30 lines
691 B
TypeScript
import { cn } from "@multica/ui/lib/utils";
|
|
|
|
const sizeMap = {
|
|
sm: "h-5 w-5 text-xs rounded",
|
|
md: "h-7 w-7 text-xs rounded-md",
|
|
lg: "h-9 w-9 text-sm rounded-md",
|
|
} as const;
|
|
|
|
interface WorkspaceAvatarProps {
|
|
name: string;
|
|
size?: keyof typeof sizeMap;
|
|
className?: string;
|
|
}
|
|
|
|
function WorkspaceAvatar({ name, size = "sm", className }: WorkspaceAvatarProps) {
|
|
return (
|
|
<span
|
|
className={cn(
|
|
"inline-flex shrink-0 items-center justify-center border bg-muted font-semibold text-muted-foreground",
|
|
sizeMap[size],
|
|
className
|
|
)}
|
|
>
|
|
{name.charAt(0).toUpperCase()}
|
|
</span>
|
|
);
|
|
}
|
|
|
|
export { WorkspaceAvatar, type WorkspaceAvatarProps };
|