refactor: update to react 19 and remove NProgress element fixing multiple player instances in videoPlayer

This commit is contained in:
Prayag Prajapati committed 2025-04-25 21:43:24 +05:30
1 parent 80080e841a
commit 18ebe4ef1e
5 files changed
+442 -423

No files matched your search

+13 -13
View File
@@ -31,8 +31,8 @@
"@react-spring/web": "^9.7.5",
"@tanem/react-nprogress": "^5.0.55",
"@tanstack/react-query": "^5.74.4",
"@tanstack/react-query-devtools": "^5.74.4",
"@tanstack/react-router": "^1.116.0",
"@tanstack/react-query-devtools": "^5.74.6",
"@tanstack/react-router": "^1.117.1",
"@tanstack/react-virtual": "^3.13.6",
"@tauri-apps/api": "2.5.0",
"@tauri-apps/plugin-clipboard-manager": "2.2.2",
@@ -43,13 +43,13 @@
"@tauri-apps/plugin-updater": "2.7.1",
"@tauri-apps/plugin-upload": "2.2.1",
"@tauri-apps/plugin-window-state": "~2.2.2",
"@types/node": "^22.14.1",
"@types/node": "^22.15.2",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"axios": "^1.8.4",
"axios": "^1.9.0",
"axios-tauri-api-adapter": "^2.0.6",
"blurhash": "^2.0.5",
"framer-motion": "^12.7.4",
"framer-motion": "^12.9.2",
"immer": "^10.1.1",
"jassub": "^1.7.18",
"libpgs": "^0.8.1",
@@ -57,11 +57,11 @@
"material-symbols": "^0.31.2",
"million": "^3.1.11",
"notistack": "^3.0.2",
"react": "^18.3.1",
"react": "^19.1.0",
"react-blurhash": "^0.3.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.3.1",
"react-dom": "^19.1.0",
"react-error-boundary": "^5.0.0",
"react-intersection-observer": "^9.16.0",
"react-markdown": "^10.1.0",
@@ -76,15 +76,15 @@
"devDependencies": {
"@babel/plugin-proposal-optional-chaining-assign": "^7.25.9",
"@biomejs/biome": "^1.9.4",
"@tanstack/router-cli": "^1.116.0",
"@tanstack/router-devtools": "^1.116.0",
"@tanstack/router-vite-plugin": "^1.116.1",
"@tanstack/router-cli": "^1.117.1",
"@tanstack/router-devtools": "^1.117.1",
"@tanstack/router-vite-plugin": "^1.117.2",
"@tauri-apps/cli": "2.5.0",
"@types/lodash": "^4.17.16",
"@vitejs/plugin-react": "^4.4.0",
"@vitejs/plugin-react": "^4.4.1",
"prop-types": "^15.8.1",
"sass": "^1.86.3",
"vite": "^6.2.2"
"sass": "^1.87.0",
"vite": "^6.3.3"
},
"license": "GPL-3.0-only"
}
+411 -392
View File
File diff suppressed because it is too large. Load diff
+2 -3
View File
@@ -21,7 +21,7 @@ export default function NProgress() {
isAnimating,
});
return createPortal(
return (
<div
style={{
pointerEvents: "none",
@@ -44,8 +44,7 @@ export default function NProgress() {
variant="determinate"
/>
)}
</div>,
document.body,
</div>
);
};
+1 -1
View File
@@ -44,7 +44,7 @@ export const Route = createRootRouteWithContext<ApiContext>()({
<CssBaseline />
<Settings />
{/* <EasterEgg /> */}
<NProgress />
{/* <NProgress /> */}
<RouterLoading />
+15 -14
View File
@@ -6,6 +6,7 @@ import { createFileRoute, redirect } from "@tanstack/react-router";
export const Route = createFileRoute("/_api")({
beforeLoad: async ({ context, location }) => {
console.log("RUNNING API CHECK");
if (!context.api) {
const currentServerId = await getDefaultServer();
if (currentServerId) {
@@ -55,20 +56,20 @@ export const Route = createFileRoute("/_api")({
}
}
} else if (context.api) {
if (context.api.accessToken && location.pathname !== "/login/manual") {
try {
console.info("AccessToken", context.api.accessToken);
await getUserApi(context.api).getCurrentUser(); // Verify user is able to authenticate
} catch (error) {
console.error(error);
throw redirect({
to: "/login/manual",
search: {
redirect: location.href,
},
});
}
}
// if (context.api.accessToken && location.pathname !== "/login/manual") {
// try {
// console.info("AccessToken", context.api.accessToken);
// await getUserApi(context.api).getCurrentUser(); // Verify user is able to authenticate
// } catch (error) {
// console.error(error);
// throw redirect({
// to: "/login/manual",
// search: {
// redirect: location.href,
// },
// });
// }
// }
}
},
});