This commit is contained in:
2023-01-16 17:48:25 +00:00
parent b6a877877f
commit 8aed2c5550
39 changed files with 706 additions and 486 deletions

View File

@ -0,0 +1,30 @@
import "./ProfilePreview.css";
import ProfileImage from "./ProfileImage";
import FollowButton from "./FollowButton";
import useProfile from "../feed/ProfileFeed";
import { HexKey } from "../nostr";
export interface ProfilePreviewProps {
pubkey: HexKey,
options?: {
about?: boolean
}
}
export default function ProfilePreview(props: ProfilePreviewProps) {
const pubkey = props.pubkey;
const user = useProfile(pubkey)?.get(pubkey);
const options = {
about: true,
...props.options
};
return (
<div className="profile-preview">
<ProfileImage pubkey={pubkey} subHeader=
{options.about ? <div className="f-ellipsis about">
{user?.about}
</div> : undefined} />
<FollowButton pubkey={pubkey} className="ml5" />
</div>
)
}