From a60b79569c6c659e5e7736bc20672f2f08ba67a0 Mon Sep 17 00:00:00 2001 From: Alec Chen <93971719+0xAlec@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:14:57 -0700 Subject: [PATCH] lint and format --- .../components/WalletDropdownFundLink.test.tsx | 5 ++--- src/wallet/components/WalletDropdownFundLink.tsx | 13 ++++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/wallet/components/WalletDropdownFundLink.test.tsx b/src/wallet/components/WalletDropdownFundLink.test.tsx index 11b77167b9..2551070d8f 100644 --- a/src/wallet/components/WalletDropdownFundLink.test.tsx +++ b/src/wallet/components/WalletDropdownFundLink.test.tsx @@ -69,11 +69,10 @@ describe('WalletDropdownFundLink', () => { { size: 'l', width: 800, height: 900 }, ]; - testCases.forEach(({ size, width, height }) => { + for (const { size, width, height } of testCases) { it(`opens a new window when clicked with type="window" and windowSize="${size}"`, () => { const mockOpen = vi.fn(); vi.stubGlobal('open', mockOpen); - vi.stubGlobal('open', mockOpen); vi.stubGlobal('screen', { width: 1024, height: 768 }); render(); @@ -94,5 +93,5 @@ describe('WalletDropdownFundLink', () => { vi.unstubAllGlobals(); vi.clearAllMocks(); }); - }); + } }); diff --git a/src/wallet/components/WalletDropdownFundLink.tsx b/src/wallet/components/WalletDropdownFundLink.tsx index 01bb7fb940..c37ca5bac7 100644 --- a/src/wallet/components/WalletDropdownFundLink.tsx +++ b/src/wallet/components/WalletDropdownFundLink.tsx @@ -48,7 +48,7 @@ export function WalletDropdownFundLink({ const commonClassName = cn( pressable.default, 'relative flex items-center px-4 py-3', - className + className, ); const linkContent = ( @@ -71,11 +71,10 @@ export function WalletDropdownFundLink({ {linkContent} ); - } else { - return ( - - {linkContent} - - ); } + return ( + + ); }