Skip to content

Commit 5f3dd89

Browse files
authored
Upgrade vite and react-router (#778)
| Package | From | To | |----------------------------------|-----------|---------| react-router | ( new ) | 7.8.2 | react-router-dom | 6.22.3 | ( del ) | @vitejs/plugin-react-swc | 3.10.2 | 4.0.1 | vite | 6.3.5 | 7.1.4 |
1 parent 1dda618 commit 5f3dd89

35 files changed

+136
-147
lines changed

ui/package-lock.json

Lines changed: 58 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "kvm-ui",
33
"private": true,
4-
"version": "2025.09.03.1500",
4+
"version": "2025.09.03.2100",
55
"type": "module",
66
"engines": {
77
"node": "22.15.0"
@@ -41,7 +41,7 @@
4141
"react-dom": "^19.1.1",
4242
"react-hot-toast": "^2.6.0",
4343
"react-icons": "^5.5.0",
44-
"react-router-dom": "^6.22.3",
44+
"react-router": "^7.8.2",
4545
"react-simple-keyboard": "^3.8.119",
4646
"react-use-websocket": "^4.13.0",
4747
"react-xtermjs": "^1.0.10",
@@ -65,7 +65,7 @@
6565
"@types/validator": "^13.15.3",
6666
"@typescript-eslint/eslint-plugin": "^8.42.0",
6767
"@typescript-eslint/parser": "^8.42.0",
68-
"@vitejs/plugin-react-swc": "^3.10.2",
68+
"@vitejs/plugin-react-swc": "^4.0.1",
6969
"autoprefixer": "^10.4.21",
7070
"eslint": "^9.34.0",
7171
"eslint-config-prettier": "^10.1.8",
@@ -79,7 +79,7 @@
7979
"prettier-plugin-tailwindcss": "^0.6.14",
8080
"tailwindcss": "^4.1.12",
8181
"typescript": "^5.9.2",
82-
"vite": "^6.3.5",
82+
"vite": "^7.1.4",
8383
"vite-tsconfig-paths": "^5.1.4"
8484
}
8585
}

ui/src/components/AuthLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useLocation, useNavigation, useSearchParams } from "react-router-dom";
1+
import { useLocation, useNavigation, useSearchParams } from "react-router";
22

33
import { Button, LinkButton } from "@components/Button";
44
import { GoogleIcon } from "@components/Icons";

ui/src/components/Button.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { JSX } from "react";
2-
import { FetcherWithComponents, Link, LinkProps, useNavigation } from "react-router-dom";
2+
import { Link, useNavigation } from "react-router";
3+
import type { FetcherWithComponents, LinkProps } from "react-router";
34

45
import ExtLink from "@/components/ExtLink";
56
import LoadingSpinner from "@/components/LoadingSpinner";

ui/src/components/Fieldset.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import clsx from "clsx";
3-
import { FetcherWithComponents, useNavigation } from "react-router-dom";
3+
import { useNavigation } from "react-router";
4+
import type { FetcherWithComponents } from "react-router";
45

56
export default function Fieldset({
67
children,

ui/src/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useCallback } from "react";
2-
import { useNavigate } from "react-router-dom";
2+
import { useNavigate } from "react-router";
33
import { ArrowLeftEndOnRectangleIcon, ChevronDownIcon } from "@heroicons/react/16/solid";
44
import { Button, Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react";
55
import { LuMonitorSmartphone } from "react-icons/lu";

ui/src/components/KvmCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { MdConnectWithoutContact } from "react-icons/md";
22
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react";
3-
import { Link } from "react-router-dom";
3+
import { Link } from "react-router";
44
import { LuEllipsisVertical } from "react-icons/lu";
55

66
import Card from "@components/Card";

ui/src/components/SimpleNavbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Link } from "react-router-dom";
1+
import { Link } from "react-router";
22
import React from "react";
33

44
import Container from "@/components/Container";

ui/src/components/popovers/MountPopover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
LuRadioReceiver,
77
} from "react-icons/lu";
88
import { useClose } from "@headlessui/react";
9-
import { useLocation } from "react-router-dom";
9+
import { useLocation } from "react-router";
1010

1111
import { Button } from "@components/Button";
1212
import Card, { GridCard } from "@components/Card";

ui/src/hooks/useAppNavigation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { useNavigate, useParams, NavigateOptions } from "react-router-dom";
1+
import { useNavigate, useParams } from "react-router";
2+
import type { NavigateOptions } from "react-router";
23
import { useCallback, useMemo } from "react";
34

45
import { isOnDevice } from "../main";

0 commit comments

Comments
 (0)