on master help sign in
search, sigil: no comets, no moons
commit5c4069a14fa5e64dc6d0dea543755d1a1a9f2836 authorMatilde Park <matilde.park@urbit.org> dateMon 25 Apr 2022, 10:33 (5 years ago) parent89d4228
2 files changed+8−1
components/Search.js+5−1 components/Sigil.js+3
components/Search.js+5−1
@@ -30,7 +30,11 @@ class Search extends Component {
3030 }
3131
3232 patpSearch(query) {
33− return ob.isValidPatp(`~${deSig(query.toLowerCase())}`) || !isNaN(query);
33+ return (
34+ (ob.isValidPatp(`~${deSig(query.toLowerCase())}`) &&
35+ `~${deSig(query.toLowerCase())}`.length < 15) ||
36+ (!isNaN(query) && query <= 4294967295)
37+ );
3438 }
3539
3640 onSelect(item) {
components/Sigil.js+3
@@ -1,6 +1,9 @@
11import { sigil, reactRenderer } from "@tlon/sigil-js";
22
33export const Sigil = ({ patp, size, icon }) => {
4+ if (patp.length > 14) {
5+ return <div />;
6+ }
47 return (
58 <div className={icon ? "p-1 bg-black" : ""}>
69 {sigil({