Make Tabs supply number instead of Number
This commit is contained in:
@@ -70,10 +70,10 @@ export const CatalogTabs = ({ tabs, onChange }: Props) => {
|
||||
}, [tabs, currentTabIndex]);
|
||||
|
||||
const switchTab = useCallback(
|
||||
(index: Number) => {
|
||||
const tab = tabs[index as number];
|
||||
(index: number) => {
|
||||
const tab = tabs[index];
|
||||
setSelectedFilters([tab.id]);
|
||||
setCurrentTabIndex(index as number);
|
||||
setCurrentTabIndex(index);
|
||||
onChangeRef.current?.(tab);
|
||||
},
|
||||
[tabs, setSelectedFilters],
|
||||
|
||||
Reference in New Issue
Block a user