diff --git a/src/views/studio/studio-tab-nav.jsx b/src/views/studio/studio-tab-nav.jsx index b66243b79ef..b2d01103916 100644 --- a/src/views/studio/studio-tab-nav.jsx +++ b/src/views/studio/studio-tab-nav.jsx @@ -1,7 +1,7 @@ -import React, {useCallback} from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; -import {useParams, NavLink} from 'react-router-dom'; +import {useRouteMatch, NavLink} from 'react-router-dom'; import {FormattedMessage} from 'react-intl'; import SubNavigation from '../../components/subnavigation/subnavigation.jsx'; @@ -40,67 +40,67 @@ const countLimits = { }; const StudioTabNav = ({isFetchingInfo, commentCount, projectCount}) => { - const {studioPath, studioId} = useParams(); + const {params: {studioPath, studioId}} = useRouteMatch(); const base = `/${studioPath}/${studioId}`; - const classes = useCallback(({isActive}) => `nav_link ${isActive ? 'active' : ''}`); return ( -
  • - - - ({limitCount(projectCount, countLimits.projects)}) - - ) - }} - /> -
  • +
  • + ({limitCount(projectCount, countLimits.projects)}) + + ) + }} + />
  • -
  • - - - ({limitCount(commentCount, countLimits.comments)}) - - ) - }} - /> -
  • +
  • + ({limitCount(commentCount, countLimits.comments)}) + + ) + }} + />
  • -
  • - - -
  • +
  • -
  • - - -
  • +
  • );