diff --git a/web/hooks/use-user.ts b/web/hooks/use-user.ts index 158235ca..df4dc8f7 100644 --- a/web/hooks/use-user.ts +++ b/web/hooks/use-user.ts @@ -46,7 +46,7 @@ export const usePrivateUser = (userId?: string) => { return privateUser } -export const useUserById = (userId: string) => { +export const useUserById = (userId = '_') => { const result = useFirestoreDocumentData( ['users', userId], doc(users, userId), diff --git a/web/pages/link/[slug].tsx b/web/pages/link/[slug].tsx index 8093969b..67e7b695 100644 --- a/web/pages/link/[slug].tsx +++ b/web/pages/link/[slug].tsx @@ -17,7 +17,7 @@ export default function ClaimPage() { const [claiming, setClaiming] = useState(false) const [error, setError] = useState(undefined) - const fromUser = useUserById(manalink?.fromId ?? '_loading') + const fromUser = useUserById(manalink?.fromId) if (!manalink) { return <> }