From a8cf772aaf0920ed477564500dd339c6574d85c6 Mon Sep 17 00:00:00 2001 From: Bero Date: Wed, 4 Oct 2023 19:37:41 +0200 Subject: [PATCH] Reset url state on tab click --- .../client/marketplace/components/tabs/tabs.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/woocommerce-admin/client/marketplace/components/tabs/tabs.tsx b/plugins/woocommerce-admin/client/marketplace/components/tabs/tabs.tsx index 195f83e924d..0ef5d44ef1b 100644 --- a/plugins/woocommerce-admin/client/marketplace/components/tabs/tabs.tsx +++ b/plugins/woocommerce-admin/client/marketplace/components/tabs/tabs.tsx @@ -60,14 +60,12 @@ const tabs: Tabs = { }; const setUrlTabParam = ( tabKey: string ) => { - if ( tabKey === DEFAULT_TAB_KEY ) { - navigateTo( { - url: getNewPath( {}, MARKETPLACE_PATH, {} ), - } ); - return; - } navigateTo( { - url: getNewPath( { tab: tabKey } ), + url: getNewPath( + { tab: tabKey === DEFAULT_TAB_KEY ? undefined : tabKey }, + MARKETPLACE_PATH, + {} + ), } ); };