-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure highlights routes appear when learner credit is available (…
- Loading branch information
1 parent
1d57072
commit 9cc4dad
Showing
2 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
import React from 'react'; | ||
import { Route } from 'react-router-dom'; | ||
import PropTypes from 'prop-types'; | ||
import { ROUTE_NAMES } from '../EnterpriseApp/data/constants'; | ||
import MultipleBudgetsPage from './MultipleBudgetsPage'; | ||
import BudgetDetailPage from './BudgetDetailPage'; | ||
|
||
const LearnerCreditManagementRoutes = ({ baseUrl }) => ( | ||
const LearnerCreditManagementRoutes = ({ match }) => ( | ||
<> | ||
<Route | ||
exact | ||
path={`${baseUrl}/admin/${ROUTE_NAMES.learnerCredit}`} | ||
path={match.path} | ||
component={MultipleBudgetsPage} | ||
/> | ||
|
||
<Route | ||
exact | ||
path={`${baseUrl}/admin/${ROUTE_NAMES.learnerCredit}/:budgetId`} | ||
path={`${match.path}/:budgetId`} | ||
component={BudgetDetailPage} | ||
/> | ||
</> | ||
); | ||
|
||
LearnerCreditManagementRoutes.propTypes = { | ||
baseUrl: PropTypes.string.isRequired, | ||
match: PropTypes.shape({ | ||
path: PropTypes.string.isRequired, | ||
}).isRequired, | ||
}; | ||
|
||
export default LearnerCreditManagementRoutes; |