From 8f60740213d9743a65957cc1f2aabe5d05617a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Jos=C3=A9?= Date: Tue, 5 Mar 2024 01:00:05 -0300 Subject: [PATCH 1/2] fix: now when the user disconnect the wallet from the sidebar, both shelves resets to the initial state. --- components/03-organisms/NftsShelf.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/03-organisms/NftsShelf.tsx b/components/03-organisms/NftsShelf.tsx index f9ad2f38..d9bc8041 100644 --- a/components/03-organisms/NftsShelf.tsx +++ b/components/03-organisms/NftsShelf.tsx @@ -67,7 +67,7 @@ export const NftsShelf = ({ address, variant }: INftsShelfProps) => { }, [destinyChain]); useEffect(() => { - if (address !== authenticatedUserAddress?.address && variant === "their") { + if ((address !== authenticatedUserAddress?.address && variant === "their") || !chain) { setNftsList([]); setNftsQueryStatus(NFTsQueryStatus.EMPTY_QUERY); } From d4eb5ae235aba8b4415a688b980b33214cafd18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Jos=C3=A9?= Date: Tue, 5 Mar 2024 11:21:48 -0300 Subject: [PATCH 2/2] fix: now the searched address shelf also resets to the initial state when the user disconnects --- components/03-organisms/NftsShelf.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/03-organisms/NftsShelf.tsx b/components/03-organisms/NftsShelf.tsx index d9bc8041..e94046af 100644 --- a/components/03-organisms/NftsShelf.tsx +++ b/components/03-organisms/NftsShelf.tsx @@ -55,6 +55,7 @@ export const NftsShelf = ({ address, variant }: INftsShelfProps) => { }, [address, chain, destinyChain]); useEffect(() => { + if ( authenticatedUserAddress && address && @@ -101,7 +102,7 @@ export const NftsShelf = ({ address, variant }: INftsShelfProps) => { variant={variant} /> - ) : nftsQueryStatus == NFTsQueryStatus.EMPTY_QUERY || !address ? ( + ) : nftsQueryStatus == NFTsQueryStatus.EMPTY_QUERY || !address || !chain ? (