Merge branch 'main' into new-ui

This commit is contained in:
Alejandro Gomez
2023-01-28 22:43:56 +01:00
57 changed files with 900 additions and 261 deletions

View File

@ -1,13 +1,13 @@
import "./ProfileImage.css";
import { useMemo } from "react";
import { useNavigate, Link } from "react-router-dom";
import useProfile from "Feed/ProfileFeed";
import { Link, useNavigate } from "react-router-dom";
import { useUserProfile } from "Feed/ProfileFeed";
import { hexToBech32, profileLink } from "Util";
import Avatar from "Element/Avatar"
import Nip05 from "Element/Nip05";
import { HexKey } from "Nostr";
import { MetadataCache } from "Db/User";
import { MetadataCache } from "State/Users";
export interface ProfileImageProps {
pubkey: HexKey,
@ -19,7 +19,7 @@ export interface ProfileImageProps {
export default function ProfileImage({ pubkey, subHeader, showUsername = true, className, link }: ProfileImageProps) {
const navigate = useNavigate();
const user = useProfile(pubkey)?.get(pubkey);
const user = useUserProfile(pubkey);
const name = useMemo(() => {
return getDisplayName(user, pubkey);