diff --git a/src/components/LinkPreview.tsx b/src/components/LinkPreview.tsx index 4d0b9da..511d3ac 100644 --- a/src/components/LinkPreview.tsx +++ b/src/components/LinkPreview.tsx @@ -120,7 +120,7 @@ const LinkPreview: React.FC = ({ link }: IProps) => { const hses = useHSs(link); - if (!hses) { + if (!hses.length) { content = ( <> diff --git a/src/components/UserPreview.tsx b/src/components/UserPreview.tsx index af9a440..0a88e6a 100644 --- a/src/components/UserPreview.tsx +++ b/src/components/UserPreview.tsx @@ -77,7 +77,7 @@ export const WrappedInviterPreview: React.FC = ({ const [user, setUser] = useState(undefined); const hss = useHSs(link); useEffect(() => { - if (hss) { + if (hss.length) { client(hss[0]) .then((c) => getUserDetails(c, link.identifier)) .then(setUser)