Skip to content

Commit c2233d0

Browse files
committed
Fix test warnings
Apparantely, React Router 7 is going to bring some changes, and people are encouraged to opt int to those early.
1 parent 66b5a6e commit c2233d0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const App = () => {
4141
}
4242

4343
return (
44-
<Router>
44+
<Router future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
4545
<Fragment>
4646
<Header />
4747
<div className="content">

tests/components/Sidebar.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import { BrowserRouter } from 'react-router-dom'
55
import Sidebar from '../../src/components/Sidebar'
66

77
const renderWithRouter = (component: React.ReactElement) => {
8-
return render(<BrowserRouter>{component}</BrowserRouter>)
8+
return render(
9+
<BrowserRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
10+
{component}
11+
</BrowserRouter>
12+
)
913
}
1014

1115
describe('Sidebar', () => {

0 commit comments

Comments
 (0)