diff --git a/web/components/layout/tabs.tsx b/web/components/layout/tabs.tsx index c22014fe..a87c6607 100644 --- a/web/components/layout/tabs.tsx +++ b/web/components/layout/tabs.tsx @@ -19,7 +19,7 @@ type TabProps = { currentPageForAnalytics?: string } -export function UncontrolledTabs(props: TabProps & { activeIndex: number }) { +export function ControlledTabs(props: TabProps & { activeIndex: number }) { const { tabs, activeIndex, @@ -69,11 +69,11 @@ export function UncontrolledTabs(props: TabProps & { activeIndex: number }) { ) } -export function ControlledTabs(props: TabProps & { defaultIndex?: number }) { +export function UncontrolledTabs(props: TabProps & { defaultIndex?: number }) { const { defaultIndex, onClick, ...rest } = props const [activeIndex, setActiveIndex] = useState(defaultIndex ?? 0) return ( - { @@ -93,7 +93,7 @@ const isTabSelected = (router: NextRouter, queryParam: string, tab: Tab) => { } } -export function QueryControlledTabs( +export function QueryUncontrolledTabs( props: TabProps & { defaultIndex?: number } ) { const { tabs, defaultIndex, onClick, ...rest } = props @@ -101,7 +101,7 @@ export function QueryControlledTabs( const selectedIdx = tabs.findIndex((t) => isTabSelected(router, 'tab', t)) const activeIndex = selectedIdx !== -1 ? selectedIdx : defaultIndex ?? 0 return ( - {usersContracts !== 'loading' && contractsById && usersComments ? ( -