diff --git a/packages/react/src/components/TabContent/TabContent.js b/packages/react/src/components/TabContent/TabContent.js index cb7e68387a36..054fe0ef224b 100644 --- a/packages/react/src/components/TabContent/TabContent.js +++ b/packages/react/src/components/TabContent/TabContent.js @@ -29,12 +29,12 @@ function useTabbableContent(ref) { const TabContent = (props) => { const { className, selected, children, ...other } = props; + const prefix = usePrefix(); const tabContentClasses = classNames(`${prefix}--tab-content`, { [className]: className, }); const ref = useRef(null); const hasTabbableContent = useTabbableContent(ref); - const prefix = usePrefix(); return (