Files
league-of-legends-gui-overhaul/src/features/social/SocialSidebar.tsx
ToxicCrzay270 45b96ec20f
All checks were successful
Release Dry Run / release-dry-run (push) Successful in 12s
Codex Template Compliance / template-compliance (push) Successful in 6s
Initialize League GUI prototype
2026-05-15 00:41:38 +02:00

45 lines
1.3 KiB
TypeScript

import { useAppContext } from "../../app/AppContext";
import { Button } from "../../components/ui";
import { friends } from "../../data/friends.mock";
import { getFriendStatusLabel } from "./friendStatus";
export function SocialSidebar() {
const { notify } = useAppContext();
return (
<aside className="social-sidebar" aria-label="Friends and social status">
<header>
<span className="eyebrow">Social</span>
<h2>Friends</h2>
</header>
<div className="social-list">
{friends.map((friend) => (
<article key={friend.id} className="social-card">
<span className={`status-dot status-${friend.status}`} />
<div>
<h3>{friend.displayName}</h3>
<p>{getFriendStatusLabel(friend.status)}</p>
<span>{friend.activity}</span>
</div>
<Button
variant="ghost"
size="sm"
disabled={friend.status === "offline"}
onClick={() =>
notify({
title: "Invite sent",
message: `${friend.displayName} received a prototype party invite.`,
variant: "success"
})
}
>
Invite
</Button>
</article>
))}
</div>
</aside>
);
}