fix viewing profile without profile event

This commit is contained in:
Martti Malmi 2023-07-29 22:47:13 +03:00
parent 1c72154100
commit db1c4afb26

View File

@ -20,7 +20,7 @@ import Stats from './Stats';
const ProfileCard = (props: { hexPub: string; npub: string }) => {
const { hexPub, npub } = props;
const [profile, setProfile] = useState<any>(SocialNetwork.profiles.get(ID(hexPub)));
const [profile, setProfile] = useState<any>(SocialNetwork.profiles.get(ID(hexPub)) || {});
const [lightning, setLightning] = useState<string>('');
const [website, setWebsite] = useState<string>('');
const [loggedIn, setLoggedIn] = useState<boolean>(false);