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