Casual refactor of entire eventBuilder

This commit is contained in:
2023-04-14 16:02:15 +01:00
parent 914fa759a9
commit 36926d4346
33 changed files with 648 additions and 580 deletions

View File

@ -63,7 +63,9 @@ export default function Layout() {
}, [location]);
useEffect(() => {
System.HandleAuth = pub.nip42Auth;
if (pub) {
System.HandleAuth = pub.nip42Auth;
}
}, [pub]);
useEffect(() => {
@ -224,7 +226,14 @@ const AccountHeader = () => {
<Icon name="bell" />
{hasNotifications && <span className="has-unread"></span>}
</div>
{profile && <Avatar user={profile} onClick={() => navigate(profileLink(profile.pubkey))} />}
<Avatar
user={profile}
onClick={() => {
if (profile) {
navigate(profileLink(profile.pubkey));
}
}}
/>
</div>
);
};