feat: query for autocompletion using local db #76

Merged
verbiricha merged 3 commits from autocomplete-query into main 2023-01-17 10:22:28 +00:00
4 changed files with 4 additions and 4 deletions
Showing only changes of commit 547b90e2b4 - Show all commits

View File

@ -15,7 +15,7 @@ export default function Mention({ pubkey }: { pubkey: HexKey }) {
name = user!.name!;
}
return name;
}, [user]);
}, [user, pubkey]);
return <Link to={profileLink(pubkey)} onClick={(e) => e.stopPropagation()}>@{name}</Link>
}

View File

@ -1,7 +1,7 @@
import { useQuery } from "react-query";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCheck, faSpinner, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";
import { faSpinner, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";
import './Nip05.css'
import { HexKey } from "../nostr";

View File

@ -28,7 +28,7 @@ export default function ProfileImage({ pubkey, subHeader, showUsername = true, c
name = user!.name!;
}
return name;
}, [user]);
}, [user, pubkey]);
return (
<div className={`pfp${className ? ` ${className}` : ""}`}>

View File

@ -3,7 +3,7 @@ import ReactMarkdown from "react-markdown";
import { TwitterTweetEmbed } from "react-twitter-embed";
import { UrlRegex, FileExtensionRegex, MentionRegex, InvoiceRegex, YoutubeUrlRegex, TweetUrlRegex, HashtagRegex } from "../Const";
import { eventLink, hexToBech32, profileLink } from "../Util";
import { eventLink, hexToBech32 } from "../Util";
import Invoice from "./Invoice";
import LazyImage from "./LazyImage";
import Hashtag from "./Hashtag";