mirror of
https://github.com/hwchase17/langchain.git
synced 2026-01-16 16:57:20 +00:00
👥 Update LangChain people data --------- Co-authored-by: github-actions <github-actions@github.com>
29 lines
995 B
JavaScript
29 lines
995 B
JavaScript
import React from "react";
|
|
import PeopleData from "../../data/people.yml"
|
|
|
|
function renderPerson({ login, avatarUrl, url }) {
|
|
return (
|
|
<div key={`person:${login}`} style={{ display: "flex", flexDirection: "column", alignItems: "center", padding: "18px" }}>
|
|
<a href={url} target="_blank">
|
|
<img src={avatarUrl} style={{ borderRadius: "50%", width: "128px", height: "128px" }} />
|
|
</a>
|
|
<a href={url} target="_blank" style={{ fontSize: "18px", fontWeight: "700" }}>@{login}</a>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default function People({ type, count }) {
|
|
let people = PeopleData[type] ?? [];
|
|
if (count !== undefined) {
|
|
people = people.slice(0, parseInt(count, 10));
|
|
}
|
|
const html = people.map((person) => {
|
|
return renderPerson(person);
|
|
});
|
|
return (
|
|
<div style={{ display: "flex", flexWrap: "wrap", padding: "10px", justifyContent: "space-around" }}>
|
|
{html}
|
|
</div>
|
|
);
|
|
}
|