Updated frontend dependencies
This commit is contained in:
@@ -12,7 +12,7 @@ export default defineConfig([
|
||||
extends: [
|
||||
js.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
reactHooks.configs["recommended-latest"],
|
||||
reactHooks.configs.flat.recommended,
|
||||
reactRefresh.configs.vite,
|
||||
],
|
||||
languageOptions: {
|
||||
|
||||
970
matrixgw_frontend/package-lock.json
generated
970
matrixgw_frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -12,14 +12,14 @@
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
"@fontsource/roboto": "^5.2.8",
|
||||
"@fontsource/roboto": "^5.2.9",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@mdi/react": "^1.6.1",
|
||||
"@mui/icons-material": "^7.3.5",
|
||||
"@mui/material": "^7.3.5",
|
||||
"@mui/x-data-grid": "^8.18.0",
|
||||
"@mui/x-date-pickers": "^8.17.0",
|
||||
"date-and-time": "^4.1.0",
|
||||
"@mui/icons-material": "^7.3.6",
|
||||
"@mui/material": "^7.3.6",
|
||||
"@mui/x-data-grid": "^8.20.0",
|
||||
"@mui/x-date-pickers": "^8.19.0",
|
||||
"date-and-time": "^4.1.1",
|
||||
"dayjs": "^1.11.19",
|
||||
"emoji-picker-react": "^4.16.1",
|
||||
"is-cidr": "^6.0.1",
|
||||
@@ -28,23 +28,23 @@
|
||||
"react-dom": "^19.1.1",
|
||||
"react-favicon": "^2.0.7",
|
||||
"react-json-view-lite": "^2.5.0",
|
||||
"react-router": "^7.9.5"
|
||||
"react-router": "^7.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.36.0",
|
||||
"@types/node": "^24.6.0",
|
||||
"@types/react": "^19.1.16",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"@vitejs/plugin-react": "^5.0.4",
|
||||
"eslint": "^9.36.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@types/node": "^24.10.1",
|
||||
"@types/react": "^19.2.7",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^5.1.1",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"eslint-plugin-react-refresh": "^0.4.22",
|
||||
"globals": "^16.4.0",
|
||||
"globals": "^16.5.0",
|
||||
"typescript": "~5.9.3",
|
||||
"typescript-eslint": "^8.45.0",
|
||||
"vite": "npm:rolldown-vite@7.1.14"
|
||||
"typescript-eslint": "^8.48.1",
|
||||
"vite": "npm:rolldown-vite@7.2.10"
|
||||
},
|
||||
"overrides": {
|
||||
"vite": "npm:rolldown-vite@7.1.14"
|
||||
"vite": "npm:rolldown-vite@7.2.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import { useAlert } from "../hooks/contexts_provider/AlertDialogProvider";
|
||||
import { time } from "../utils/DateUtils";
|
||||
|
||||
export function APITokensRoute(): React.ReactElement {
|
||||
const count = React.useRef(0);
|
||||
const [count, setCount] = React.useState(0);
|
||||
|
||||
const [openCreateTokenDialog, setOpenCreateTokenDialog] =
|
||||
React.useState(false);
|
||||
@@ -34,7 +34,7 @@ export function APITokensRoute(): React.ReactElement {
|
||||
};
|
||||
|
||||
const handleRefreshTokensList = () => {
|
||||
count.current += 1;
|
||||
setCount((c) => c + 1);
|
||||
setList(undefined);
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ export function APITokensRoute(): React.ReactElement {
|
||||
|
||||
{/* Tokens list */}
|
||||
<AsyncWidget
|
||||
loadKey={count.current}
|
||||
loadKey={count}
|
||||
ready={list !== undefined}
|
||||
load={load}
|
||||
errMsg="Failed to load the list of tokens!"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Alert, Box, Button, CircularProgress } from "@mui/material";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import React from "react";
|
||||
|
||||
const State = {
|
||||
Loading: 0,
|
||||
@@ -17,9 +17,7 @@ export function AsyncWidget(p: {
|
||||
ready?: boolean;
|
||||
errAdditionalElement?: () => React.ReactElement;
|
||||
}): React.ReactElement {
|
||||
const [state, setState] = useState<number>(State.Loading);
|
||||
|
||||
const counter = useRef<unknown>(null);
|
||||
const [state, setState] = React.useState<number>(State.Loading);
|
||||
|
||||
const load = async () => {
|
||||
try {
|
||||
@@ -32,12 +30,10 @@ export function AsyncWidget(p: {
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (counter.current === p.loadKey) return;
|
||||
counter.current = p.loadKey;
|
||||
|
||||
React.useEffect(() => {
|
||||
load();
|
||||
});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [p.loadKey]);
|
||||
|
||||
if (state === State.Error)
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user