Skip to content

Commit c147df0

Browse files
authored
React Router 7 (#2628)
* bump package version * convert all the imports, everything works but the scroll restore test * make scroll restore test pass * upgrade vite and vitest * use 7.1.1 stable * fix package-lock.json
1 parent 63954c8 commit c147df0

File tree

97 files changed

+376
-805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+376
-805
lines changed

app/components/ErrorBoundary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright Oxide Computer Company
77
*/
88
import { ErrorBoundary as BaseErrorBoundary } from 'react-error-boundary'
9-
import { useRouteError } from 'react-router-dom'
9+
import { useRouteError } from 'react-router'
1010

1111
import { type ApiError } from '~/api/errors'
1212

app/components/ErrorPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright Oxide Computer Company
77
*/
88
import type { ReactNode } from 'react'
9-
import { Link } from 'react-router-dom'
9+
import { Link } from 'react-router'
1010

1111
import { Error12Icon, PrevArrow12Icon } from '@oxide/design-system/icons/react'
1212

app/components/QueryParamTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright Oxide Computer Company
77
*/
8-
import { useSearchParams } from 'react-router-dom'
8+
import { useSearchParams } from 'react-router'
99

1010
import { Tabs, type TabsRootProps } from '~/ui/lib/Tabs'
1111

app/components/RouteTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
import cn from 'classnames'
99
import type { ReactNode } from 'react'
10-
import { Link, Outlet } from 'react-router-dom'
10+
import { Link, Outlet } from 'react-router'
1111

1212
import { useIsActivePath } from '~/hooks/use-is-active-path'
1313
import { KEYS } from '~/ui/util/keys'

app/components/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright Oxide Computer Company
77
*/
88
import cn from 'classnames'
9-
import { NavLink, useLocation } from 'react-router-dom'
9+
import { NavLink, useLocation } from 'react-router'
1010

1111
import { Action16Icon, Document16Icon } from '@oxide/design-system/icons/react'
1212

app/components/TopBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright Oxide Computer Company
77
*/
88
import cn from 'classnames'
9-
import { Link } from 'react-router-dom'
9+
import { Link } from 'react-router'
1010

1111
import { navToLogin, useApiMutation } from '@oxide/api'
1212
import {

app/components/form/FullPageForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
import { cloneElement, useEffect, type ReactNode } from 'react'
99
import type { FieldValues, UseFormReturn } from 'react-hook-form'
10-
import { useBlocker, type Blocker } from 'react-router-dom'
10+
import { useBlocker, type Blocker } from 'react-router'
1111

1212
import type { ApiError } from '@oxide/api'
1313

app/components/form/SideModalForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { useEffect, useId, useState, type ReactNode } from 'react'
1010
import type { FieldValues, UseFormReturn } from 'react-hook-form'
11-
import { NavigationType, useNavigationType } from 'react-router-dom'
11+
import { NavigationType, useNavigationType } from 'react-router'
1212

1313
import type { ApiError } from '@oxide/api'
1414

app/forms/disk-create.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { filesize } from 'filesize'
99
import { useMemo } from 'react'
1010
import { useController, useForm, type Control } from 'react-hook-form'
11-
import { useNavigate, type NavigateFunction } from 'react-router-dom'
11+
import { useNavigate, type NavigateFunction } from 'react-router'
1212

1313
import {
1414
useApiMutation,

app/forms/firewall-rules-create.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright Oxide Computer Company
77
*/
88
import { useForm } from 'react-hook-form'
9-
import { useNavigate, useParams, type LoaderFunctionArgs } from 'react-router-dom'
9+
import { useNavigate, useParams, type LoaderFunctionArgs } from 'react-router'
1010

1111
import {
1212
apiQueryClient,

0 commit comments

Comments
 (0)