diff --git a/src/applications/edu-benefits/10215/components/AboutPage.jsx b/src/applications/edu-benefits/10215/components/AboutPage.jsx index d6f11412aa5b..a380bb3104f1 100644 --- a/src/applications/edu-benefits/10215/components/AboutPage.jsx +++ b/src/applications/edu-benefits/10215/components/AboutPage.jsx @@ -18,7 +18,7 @@ const AboutPage = ({ props }) => { return (
- +

About VA Form 22-10215

@@ -67,6 +67,9 @@ const AboutPage = ({ props }) => { }; AboutPage.propTypes = { props: PropTypes.shape({ + location: PropTypes.shape({ + pathname: PropTypes.string.isRequired, + }).isRequired, router: PropTypes.shape({ push: PropTypes.func.isRequired, }).isRequired, diff --git a/src/applications/edu-benefits/10215/components/Breadcrumbs.jsx b/src/applications/edu-benefits/10215/components/Breadcrumbs.jsx index 72b9d6fc0e86..fe5db4c0f57e 100644 --- a/src/applications/edu-benefits/10215/components/Breadcrumbs.jsx +++ b/src/applications/edu-benefits/10215/components/Breadcrumbs.jsx @@ -1,16 +1,14 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { VaBreadcrumbs } from '@department-of-veterans-affairs/web-components/react-bindings'; -import { BrowserRouter as Router, useLocation } from 'react-router-dom'; -const BreadcrumbsComponent = () => { - const location = useLocation(); - const { pathname } = location; +const Breadcrumbs = ({ pathname }) => { const crumbs = [ { href: '/', label: 'Home', }, - ...(pathname.endsWith('/10215/') + ...(pathname === '/' ? [ { href: '/find-forms/', @@ -48,11 +46,8 @@ const BreadcrumbsComponent = () => {

); }; - -const Breadcrumbs = () => ( - - - -); +Breadcrumbs.propTypes = { + pathname: PropTypes.string.isRequired, +}; export default Breadcrumbs; diff --git a/src/applications/edu-benefits/10215/components/CalculationInstructions.jsx b/src/applications/edu-benefits/10215/components/CalculationInstructions.jsx index 6ec87beb568f..7e5313b835ee 100644 --- a/src/applications/edu-benefits/10215/components/CalculationInstructions.jsx +++ b/src/applications/edu-benefits/10215/components/CalculationInstructions.jsx @@ -1,12 +1,13 @@ import React from 'react'; +import PropTypes from 'prop-types'; import NeedHelp from './NeedHelp'; -import BreadcrumbInstructionPage from './Breadcrumbs'; +import Breadcrumbs from './Breadcrumbs'; -export const CalculationInstructions = () => { +export const CalculationInstructions = ({ props }) => { return (
- +

Calculation instructions for VA Form 22-10215: Statement of Assurance of @@ -245,3 +246,13 @@ export const CalculationInstructions = () => {

); }; + +CalculationInstructions.propTypes = { + props: PropTypes.shape({ + router: PropTypes.shape({ + location: PropTypes.shape({ + pathname: PropTypes.string, + }), + }), + }), +}; diff --git a/src/applications/edu-benefits/10215/containers/App.jsx b/src/applications/edu-benefits/10215/containers/App.jsx index fdd31345e4ad..7efab8da5641 100644 --- a/src/applications/edu-benefits/10215/containers/App.jsx +++ b/src/applications/edu-benefits/10215/containers/App.jsx @@ -20,7 +20,7 @@ export default function App({ location, children }) { return (
- +
{children} diff --git a/src/applications/edu-benefits/10215/routes.jsx b/src/applications/edu-benefits/10215/routes.jsx index 00461c9d3bd9..ba8c1a8c0d6e 100644 --- a/src/applications/edu-benefits/10215/routes.jsx +++ b/src/applications/edu-benefits/10215/routes.jsx @@ -8,7 +8,7 @@ import AboutPage from './components/AboutPage'; const route = [ { path: '/calculation-instructions', - component: CalculationInstructions, + component: props => , }, { path: '/',