Skip to content

Commit

Permalink
refactor: change handleTabNavigation parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva committed Sep 19, 2024
1 parent 70e8d3b commit d458f98
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export default function CampaignsDetailsPage() {
return tab;
};

const handleTabNavigation = (newTab: CampaignDetailsTab) => {
const handleTabNavigation = (tabId: string) => {
const newTab = tabs.find((tab) => tab.id === tabId);

// @ts-ignore
const url = new URL(window.location);
const urlParams = new URLSearchParams(url.search);
Expand Down Expand Up @@ -185,7 +187,7 @@ export default function CampaignsDetailsPage() {
className={styles.root}
defaultSelectedKey={activeTab.id}
selectedKey={activeTab.id}
onSelectionChange={(tabId) => handleTabNavigation(tabs.find((tab) => tab.id === tabId))}
onSelectionChange={handleTabNavigation}
>
<div>
<TabList className={styles.tabs}>
Expand Down

0 comments on commit d458f98

Please sign in to comment.