bugfix logged out
This commit is contained in:
@ -78,7 +78,7 @@ export function LiveChat({
|
||||
return () => System.ProfileLoader.UntrackMetadata(pubkeys);
|
||||
}, [feed.zaps]);
|
||||
|
||||
const userEmojiPacks = useEmoji(login!.pubkey);
|
||||
const userEmojiPacks = useEmoji(login?.pubkey);
|
||||
const userEmojis = userEmojiPacks.map((pack) => pack.emojis).flat();
|
||||
const channelEmojiPacks = useEmoji(host);
|
||||
const allEmojiPacks = useMemo(() => {
|
||||
|
@ -44,8 +44,9 @@ export function packId(pack: EmojiPack): string {
|
||||
return `${pack.author}:${pack.name}`;
|
||||
}
|
||||
|
||||
export default function useEmoji(pubkey: string) {
|
||||
export default function useEmoji(pubkey?: string) {
|
||||
const sub = useMemo(() => {
|
||||
if(!pubkey) return null;
|
||||
const rb = new RequestBuilder(`emoji:${pubkey}`);
|
||||
|
||||
rb.withFilter()
|
||||
@ -71,6 +72,7 @@ export default function useEmoji(pubkey: string) {
|
||||
}, [userEmoji]);
|
||||
|
||||
const subRelated = useMemo(() => {
|
||||
if(!pubkey) return null;
|
||||
const splitted = related.map((t) => t.at(1)!.split(":"));
|
||||
const authors = splitted
|
||||
.map((s) => s.at(1))
|
||||
|
Reference in New Issue
Block a user