From 768477ea6c2a9858f98e133ecfe2d759780c7c72 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 22 Dec 2023 23:02:44 +0800 Subject: [PATCH] Handle cases when account is undefined --- src/components/account-block.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/account-block.jsx b/src/components/account-block.jsx index dde1b110..4cce3422 100644 --- a/src/components/account-block.jsx +++ b/src/components/account-block.jsx @@ -39,6 +39,10 @@ function AccountBlock({ ); } + if (!account) { + return null; + } + // const navigate = useNavigate(); const {