From 932fa08a5ed01e7d6c434e0f210c8361342208c0 Mon Sep 17 00:00:00 2001 From: Pawan Paudel Date: Fri, 2 Aug 2024 22:36:46 +0545 Subject: [PATCH] refactor: Clear frames from memory on component unmount --- src/routes/popup/settings/wallets/[address]/qr.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/popup/settings/wallets/[address]/qr.tsx b/src/routes/popup/settings/wallets/[address]/qr.tsx index 3f987674..1fb0fcd5 100644 --- a/src/routes/popup/settings/wallets/[address]/qr.tsx +++ b/src/routes/popup/settings/wallets/[address]/qr.tsx @@ -90,6 +90,10 @@ export default function GenerateQR({ address }: { address: string }) { } }, [wallet]); + useEffect(() => { + return () => setFrames([]); + }, []); + return (