From 1d2f019dc992239873e19e35fe8d5c0dde1396f5 Mon Sep 17 00:00:00 2001 From: acaldas Date: Wed, 10 Apr 2024 12:23:51 +0100 Subject: [PATCH] fix: wait for renown to load --- src/components/root.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/root.tsx b/src/components/root.tsx index 328f5fd7..bb468d7c 100644 --- a/src/components/root.tsx +++ b/src/components/root.tsx @@ -23,13 +23,17 @@ const Root = () => { const [searchParams, setSearchParams] = useSearchParams(); useEffect(() => { + if (!renown) { + return; + } + const userStr = searchParams.get('user'); if (userStr) { const userDid = decodeURIComponent(userStr); searchParams.delete('user'); setSearchParams(searchParams); renown - ?.user() + .user() .then(user => { if (user?.did === userDid) { return;