Skip to content

Commit

Permalink
Merge pull request #2011 from GSA/1987-update-router-v7
Browse files Browse the repository at this point in the history
1987 update router v7
  • Loading branch information
scottqueen-bixal authored Dec 16, 2024
2 parents 02c1529 + 4176278 commit 978522e
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 48 deletions.
75 changes: 42 additions & 33 deletions benefit-finder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions benefit-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-modal": "^3.16.1",
"react-router": "^6.26.2",
"react-router-dom": "^6.26.2"
"react-router": "^7.0.2"
},
"devDependencies": {
"@babel/preset-env": "^7.25.3",
Expand Down
2 changes: 1 addition & 1 deletion benefit-finder/src/App/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, createContext, useEffect, useMemo } from 'react'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import { BrowserRouter, Routes, Route } from 'react-router'
import { version } from '../../package.json'
import { useResetElement } from '@hooks'
import * as apiCalls from '@api/apiCalls'
Expand Down
2 changes: 1 addition & 1 deletion benefit-finder/src/Routes/Intro/__tests__/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from '@testing-library/react'
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import Intro from '../index.jsx'
import * as en from '@locales/en/en.json'
import content from '@api/mock-data/current.js'
Expand Down
2 changes: 1 addition & 1 deletion benefit-finder/src/Routes/Intro/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useContext } from 'react'
import { useNavigate, useLocation } from 'react-router-dom'
import { useNavigate, useLocation } from 'react-router'
import { RouteContext } from '@/App'
import { dataLayerUtils } from '@utils'
import { useResetElement } from '@hooks'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import { RouteContext } from '@/App'
import { cleanString } from '@utils'
import LifeEventSection from '../index.jsx'
Expand Down
2 changes: 1 addition & 1 deletion benefit-finder/src/Routes/LifeEventSection/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState, useEffect, useRef, useContext, Fragment } from 'react'
import { RouteContext } from '@/App'
import { useNavigate, useLocation } from 'react-router-dom'
import { useNavigate, useLocation } from 'react-router'
import PropTypes from 'prop-types'
import {
dateInputValidation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import ResultsView from '../index.jsx'
import * as apiCalls from '@api/apiCalls.js'
import * as en from '@locales/en/en.json'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from '@testing-library/react'
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import Results from '../index.jsx'
import * as en from '@locales/en/en.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useContext } from 'react'
import PropTypes from 'prop-types'
import { RouteContext } from '@/App'
import { useNavigate } from 'react-router-dom'
import { useNavigate } from 'react-router'
import {
BenefitAccordionGroup,
Button,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from '@testing-library/react'
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import ZeroBenefitsHeading from '../index.jsx'
import * as en from '@locales/en/en.json'
const { resultsView } = en
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types'
import { useContext } from 'react'
import { RouteContext } from '@/App'
import { useNavigate } from 'react-router-dom'
import { useNavigate } from 'react-router'
import { Button, Heading, StepBackButton } from '@components'
import { createMarkup } from '@utils'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from '@testing-library/react'
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import VerifySelectionsView from '../index.jsx'
import * as en from '@locales/en/en.json'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ describe('RelativeBenefitList', () => {
expect(links[0].href).toContain(relativeBenefits[0].lifeEvent.lifeEventId)
expect(links[1].href).toContain(relativeBenefits[1].lifeEvent.lifeEventId)
// ensure the icons that contain values from the lifeEventId are in the dom
console.log(relativeBenefits[0].lifeEvent.lifeEventId)
expect(
screen.getByTestId(
`benefit-finder-icon--${relativeBenefits[0].lifeEvent.lifeEventId}`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from '@testing-library/react'
import { BrowserRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router'
import StepIndicator from '../index.jsx'
import content from '@api/mock-data/current.js'
// import * as en from '@locales/en/en.json'
Expand Down

0 comments on commit 978522e

Please sign in to comment.